- protected void btnUpdate_Click1(object sender, EventArgs e)
- {
- //TextBox txtISIN = (TextBox)grdLabEntry.Rows[0].FindControl("txtISINNumber");
- TextBox txtGrade = (TextBox)grdLabEntry.Rows[0].FindControl("txtGrade");
- TextBox txtValidity = (TextBox)grdLabEntry.Rows[0].FindControl("txtValidity");
- TextBox txtFED = (TextBox)grdLabEntry.Rows[0].FindControl("txtFED");
- //DMatEntry obj = new DMatEntry();
- SpotEntry obj = new SpotEntry();
- obj.SpotEntryId = RId;
- //obj.ISINNumber = txtISIN.Text;
- obj.Grade = txtGrade.Text;
- obj.Validity = Convert.ToDateTime(txtValidity.Text);
- obj.FEd = Convert.ToDateTime(txtFED.Text);
- int result = SpotEntry.UpdateLabEntry(obj);
- if (result > 0)
- {
- grdLabEntry.EditIndex = -1;
- obj.SpotEntryId = RId;
- DataTable dt = SpotEntry.GetAllDmatRecordsById(obj);
- if (dt.Rows.Count > 0)
- {
- showmsg("Dmat Lab Entry Updated Successfully.");
- grdLabEntry.DataSource = dt;
- grdLabEntry.DataBind();
- }
- }
how to solve date string not in correct format
how to solve date string is not recognize as a valid date.
actully when insert date it take dd/mm/yyyy but when i select date greater then 12 it throw error date string not valid date because it understand dd /mm/yyyy to mm/dd/yyyy
so what can i do to solve this.
above is my code which i add in aspx file

Nitin SontakkePosted Jul 13, 2018, 2:07 AM
Nitin SontakkePosted Jul 13, 2018, 2:03 AM
Deekshaa Singh ChauhanPosted Jul 13, 2018, 1:49 AM