protected void btnSubmit_Click(object sender, EventArgs e) { string connectionString = ConfigurationManager.ConnectionStrings["connection"].ConnectionString; _studentService = new Student(connectionString); _studentService.UpdateStudent(txtName.Text, Convert.ToInt32(txtEnrollNumber.Text), Convert.ToInt32(ddlStreamId.Text), Convert.ToInt32(txtMarks.Text), Convert.ToInt32(ddlStateId.Text), ddlState.Text, ddlStream.Text); Response.Redirect("HomePage.aspx"); }