lorena Posted November 18, 2005 Posted November 18, 2005 I have an asp.net datagrid and when I delete a date from a date field, the value is set to 1/1/1900. What do I need to do to just set it to null? Here is the code for the value: If CType(e.Item.FindControl("txtEditSchedComplDate"), TextBox).Text <> "" then SchedComplDate = Convert.ToString(CType(e.Item.FindControl("txtEditSchedComplDate"), TextBox).Text) Else SchedComplDate = DBNull.Value.ToString End If The variable SchedComplDate is dimmed as Object. Any help/advice would be appreciated. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.