protected void Page_Load(object sender, EventArgs e) { prospHandler = new ProspectiveHandler(); //if (!IsPostBack) //{ // BindData(); //} }
protected void btnSubmit_Click(object sender, EventArgs e) { LambdaSigmaDataAccess.Prospective prosp = new LambdaSigmaDataAccess.Prospective(); prosp.FirstName = txtFirstName.Text; prosp.LastName = txtLastName.Text; prosp.PhoneNumber = txtPhone.Text; prosp.Email = txtEmail.Text; prosp.Concentration = ddlConcentration.SelectedItem.ToString(); prosp.ExpectedGrad = ddlStudentStatus.SelectedItem.ToString(); prosp.RegistrationTime = System.DateTime.Now; ProspectiveHandler prospHandler = new ProspectiveHandler(); if (prospHandler.AddNewProspective(prosp) == true) { Response.Redirect("Default.aspx"); } }