Name txt_name.Text Date of birth textbox(calendarimage) Mobile Number txt_mobile.text Wedding date textbox(calendar image) Email txt_mobile.text
DateTime DOB = Convert.ToDateTime(FromDate.SelectedDateValue); DateTime TodayDate = DateTime.Today; if (DOB.Date >= TodayDate.Date) { Label6.Text = ("selected date is not greater than current date"); } DateTime Weddingday = Convert.ToDateTime(Todate.SelectedDateValue); DateTime todaydate1 = DateTime.Today; if (Weddingday.Date >= todaydate1.Date) { Label6.Text = ("selected date is not greater than currentdate"); }
protected void="" eventargs="" mode="hold" /> { Label6.Text = ""; if (FromDate.SelectedDateValue.ToString() == "") { Label6.Text = "From date is not selected"; return; } if (Todate.SelectedDateValue.ToString() == "") { Label6.Text = "To date is not selected"; return; } Sql ="insert into BirthDayWish values('" + txt_name.Text + "','" + FromDate.SelectedDateValue.ToString() + "','" + txt_mobile.Text + "','" + Todate.SelectedDateValue.ToString() + "','" + txt_Email.Text + "','A')"; try { SCon.Error = ""; SCon.ExecSql(Sql); if (SCon.Error.ToString() != "";) { Label6.Text = Session["Error";].ToString(); } SCon.Con.Close(); } catch (Exception Ex1) { Response.Write(Ex1); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)