jimktrains
IS-IT--Management
I have a textbox that is for a date field. There are two DropDownLists that get loaded after the date is entered because what is available in them depends on the date entered. There is a OnTextChanged event attached to the textbox. When the user enters a date, the DropDownLists are always loaded. When the user is loading the record to edit, meaning they are not entering the date, is it loaded from code behind, the DropDownLists get loaded, except when the month and date are two digit numbers. If the date were 09/10/2013, it works, if the date is 10/09/2013 it works, but if the date is 10/10/2013, the DropDownLists are not loaded. The method to build the DropDownLists is not called but it is for the other dates (09/09/2013 and 10/09/2013). I have devised a work around to set a flag when it is called and call it after the record is loaded only if the flag isn't set.
Here's the code for the texbox.
<asp:TextBox ID="txt_date" runat="server" Width="80px" MaxLength="10" AutoPostBack="true" OnTextChanged="set_fac" />
I can live with this solution, but wondering why it doesn't work in the first place bothers me. Any ideas?
Jim
Here's the code for the texbox.
<asp:TextBox ID="txt_date" runat="server" Width="80px" MaxLength="10" AutoPostBack="true" OnTextChanged="set_fac" />
I can live with this solution, but wondering why it doesn't work in the first place bothers me. Any ideas?
Jim