code as follows; private SqlDataCon SCon = new SqlDataCon();private SqlDataReader Dr; insert code as follows; Collapse | Copy Code protected void Button1_Click(object sender, EventArgs e)
{
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() + "','a','" + txt_Email.Text + "')";
try
{
Dr = SCon.ReadSql(Sql);
Dr.Close();
}
catch (Exception Ex1)
{
Response.Write(Ex1);
}
}
but is not saving in the database why>