protected void btn2_Click(object sender, EventArgs e) { try { DataView dv = (DataView)Sqlds0.Select(new DataSourceSelectArguments()); if (dv.Count == 0) { int n = Sqlds.Insert(); if (n == 1) { String ppath = Server.MapPath("Auth"); FileUpload1.SaveAs(ppath + "\\" + FileUpload1.FileName); Response.Write("<script>alert('Data Inserted Successfully..')</script>"); CleartextBoxes(this); Server.Transfer("Default.aspx"); } else { Response.Write("<script>alert('Please fill the form Correctly')</script>"); } } else { Response.Write("<script>alert('User Already exists...Please Choose Different Password.')</script>"); return; } } catch (Exception er) { Response.Write(er.Message); } }
protected void btn2_Click(object sender, EventArgs e) { try { int n = Sqlds.Insert(); if (n == 1) { Response.Write("<script>alert('Data Inserted Successfully')</script>"); txtSchoolType.Text = ""; txtStandard.Text = ""; } else { Response.Write("<script>alert('Please fill the form Correctly')</script>"); } } catch (Exception er) { Response.Write(er.Message); } }