Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: problem populating maskededitextender with date [28016]

$
0
0
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: The example you provided earlier is running without any issues on my side. I attached a sample project so that you can check this behavior on your side. Please let me know if this example helps you.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>