protected void btn_submit_Click(object sender, EventArgs e) { bool isLegal = bl.is_legal_student(txt_enroll_no.Text, txt_fn.Text, txt_ln.Text, Convert.ToInt32(drp_clg.SelectedValue), txt_mob_no.Text, txt_email.Text); if (isLegal) { int i = bl.insert_student(txt_enroll_no.Text, txt_fn.Text, txt_ln.Text, Convert.ToInt32(drp_city.SelectedValue), Convert.ToInt32(drp_clg.SelectedValue), txt_dept.Text, txt_sem.Text, Convert.ToInt32(drp_country_code.SelectedValue), txt_mob_no.Text, rb_gender.SelectedValue, txt_email.Text, txt_pswd.Text); if (i > 0) { Response.Redirect("stu_login.aspx"); } } else { Response.Write("<script>alert('Please enter correct information')</script>"); } }