I've upgraded to the latest ajax toolkit and now and having problems with the maskededitextender. It works great when my users are filling out forms but when I try to display the contents of the form later on, I cannot get the dates to populate. I narrowed things down to a small piece of code to demonstrate.
Here is the html for a textbox and mask:
<asp:TextBox ID="tbDOB" runat="server" MaxLength="20"></asp:TextBox>
<asp:MaskedEditExtender ID="MaskedEditDOB" runat="server" Mask="99/99/9999" MaskType="Date" TargetControlID="tbDOB" />
And in the vb.net code behind the page, I simply want to populate that textbox as follows:
tbDOB.text = "1/1/2015"
(Normally, this would be a date retrieved from the database - this is easier to see the issue)
When I load the page, the textbox appears with the mask (__/__/____) but does not put 1/1/2015 in the box.
What am I doing wrong? I swear this was working before I updated the toolkit so perhaps there is a different way to handle dates in the extender? If I get rid of the mask, then the date populates without a problem.
Comments: Would you please try setting a mask value with leading zeros, for example, "01/01/2015"? Also, specify the version of our AJAX Control Toolkit from which you upgraded.
Here is the html for a textbox and mask:
<asp:TextBox ID="tbDOB" runat="server" MaxLength="20"></asp:TextBox>
<asp:MaskedEditExtender ID="MaskedEditDOB" runat="server" Mask="99/99/9999" MaskType="Date" TargetControlID="tbDOB" />
And in the vb.net code behind the page, I simply want to populate that textbox as follows:
tbDOB.text = "1/1/2015"
(Normally, this would be a date retrieved from the database - this is easier to see the issue)
When I load the page, the textbox appears with the mask (__/__/____) but does not put 1/1/2015 in the box.
What am I doing wrong? I swear this was working before I updated the toolkit so perhaps there is a different way to handle dates in the extender? If I get rid of the mask, then the date populates without a problem.
Comments: Would you please try setting a mask value with leading zeros, for example, "01/01/2015"? Also, specify the version of our AJAX Control Toolkit from which you upgraded.