protected void btnsubmit_Click(object sender, EventArgs e) { cn.connect(); DateTime dt; dt = DateTime.Now; txtdt.Text = dt.ToString("dd/MM/yyyy"); if (txtid.Text == "") { MessageBox.Show("Select Department And Click On Generate Id button to generate the Student ID"); } if (txtname.Text == "") { MessageBox.Show("Enter Candidate Name"); } if (txtfname.Text == "") { MessageBox.Show("Enter Father's Name"); } if (txtfphno.Text == "") { MessageBox.Show("Enter Father's Phone Number"); } if (txtmname.Text == "") { MessageBox.Show("Enter Mother's Name"); } if (txtmphno.Text == "") { MessageBox.Show("Enter Mother's Phone Number"); } if (txtdb.Text == "") { MessageBox.Show("Enter Valid DOB"); } if (txttmpadd.Text == "") { MessageBox.Show("Enter Temporary Address"); } if (txtperadd.Text == "") { MessageBox.Show("Enter Permanent Address"); } if (ddlmoa.SelectedItem.Text == "--select--") { MessageBox.Show("Select Mode Of Admission"); } if (txteamra.Text == "") { MessageBox.Show("Enter Eamcet Rank"); } if (txtmailid.Text == "") { MessageBox.Show("Enter Valid MailID"); } if (txtpwd.Text == "") { MessageBox.Show("Enter Password"); } if (txtrepwd.Text == "") { MessageBox.Show("Re-Enter Password"); } else { //string str = con1.StReg(txtid.Text, ddldept.SelectedItem.Text, txtfname.Text, txtlname.Text, txtfname.Text, txtdob.Text, txtperdet.Text, txtperdet.Text, txtmail.Text, txtnationality.Text, txtrno.Text, txtmobile.Text, txttenname.Text, txttenspec.Text, txtyop.Text, txttenaggre.Text, txtintername.Text, txtintersec.Text, txtinteryop.Text, txtinteraggre.Text, txthtn.Text, txtrank.Text, txtjdt.Text, ddlcaste.SelectedItem.Text, txtallotno.Text, txtannincme.Text, txtaddmno.Text, txttop.Text, txtamtpaid.Text, txtpwd.Text, txtrepwd.Text); //if (str == "1") string str = cn.streg(txtregno.Text, txtid.Text, ddldept.SelectedItem.Text, txtname.Text, txtperno.Text, txtfname.Text, txtfphno.Text, txtmname.Text, txtmphno.Text, txtdb.Text, txtfoc.Text, txtnapl.Text, txttmpadd.Text, txtpinco.Text, txtperadd.Text, txtppinco.Text, ddlmoa.SelectedItem.Text, txteamra.Text, txthaltickno.Text, txtmailid.Text, txtbssc.Text, txtpssc.Text, txtsscm.Text, txtb1stinter.Text, txtp1stinter.Text, txt1stinterm.Text, txtb2ndinter.Text, txtp2ndinter.Text, txt2ndinterm.Text, txtpwd.Text, txtrepwd.Text, txtdt.Text, txttamt.Text, txtpamt.Text); if (str == "1") { string i = txtid.Text; MessageBox.Show("Successfully Register the student Of Id"); Response.Redirect("HOME.aspx"); txtid.Text = ""; //txtaddmno.Text = ""; //txtallotno.Text = ""; //txtamtpaid.Text = ""; //txtannincme.Text = ""; //txtbalnce.Text = ""; txtdb.Text = ""; txtfname.Text = ""; txtmname.Text = ""; txtentmar.Text = ""; //txtgender.Text = ""; txthaltickno.Text = ""; txtp2ndinter.Text = ""; txtp1stinter.Text = ""; txtpssc.Text = ""; txtb2ndinter.Text = ""; txtbssc.Text = ""; txtb1stinter.Text = ""; txtsscm.Text = ""; txt1stinterm.Text = ""; txt2ndinterm.Text = ""; txtentmar.Text = ""; txtname.Text = ""; txtmailid.Text = ""; txtppinco.Text = ""; txtpinco.Text = ""; txtnapl.Text = ""; txteamra.Text = ""; txtregno.Text = ""; txttmpadd.Text = ""; txtperadd.Text = ""; txtperno.Text = ""; txtfphno.Text = ""; txtfoc.Text = ""; txtmphno.Text = ""; txtrepwd.Text = ""; txtpwd.Text = ""; } } }