I have a textbox that I use to gather a date. I would like to have the database store a null if this field is left blank by the user when submitting.
I am using the following on my aspx page:
<div class="col-md-3">
<strong>Date Submitted to TDI</strong><br />
<asp:TextBox ID="sub_tdi_dt" runat="server" Enabled="true"></asp:TextBox>
<asp:ImageButton ID="sub_tdi_dt_cal_popup" Enabled="false" ImageUrl="Images/calendar.png" ImageAlign="Bottom" runat="server" />
<ajaxToolkit:CalendarExtender runat="server" BehaviorID="sub_tdi_dt_CalendarExtender" PopupButtonID="sub_tdi_dt_cal_popup" TargetControlID="sub_tdi_dt" ID="sub_tdi_dt_CalendarExtender"></ajaxToolkit:CalendarExtender>
</div>
I have tried using the following in Page_Load, but it doesn't work - I still get '1/1/1900':
DateTime? sub_tdi_dt = null;
Thanks,
J