Question

I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessary.

How can I have the MEE field pre-populate with the database value when the data is shown on the page? I've tried to use 'bind' in the 'InitialValue' property but it doesn't populate the textbox.

Thanks.

Was it helpful?

Solution

We found out this morning why our code was mishandling the extender. Since the db was handling the date as a date/time it was returning the date in this format 99/99/9999 99:99:99 but we had the extender mask looking for this format 99/99/9999 99:99

Mask="99/99/9999 99:99:99"

the above code fixed the problem. thanks to everyone for their help.

OTHER TIPS

Are you referring to the asp.Net Ajax toolkit extensions at:

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/MaskedEdit/MaskedEdit.aspx

If so have you checked that your data is coming back in the correct format? It will have to match your date format in order to be displayed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top