MaskedEditExtender not working on Textbox


I'm trying to make a masked date textbox to enter dates. I'm using the code showned below. This is not working.

Can someone give me an idea of what can be the problem?


<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
      <asp:TextBox ID="txtDias" runat="server" Width="100px"></asp:TextBox>&nbsp;
      <cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Mask="99/99/9999" MaskType="Date" TargetControlID="txtDias" PromptCharacter="_"> </cc1:MaskedEditExtender>
      <cc1:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1" ControlToValidate="txtDias" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" IsValidEmpty="False" TooltipMessage="Input a Date"></cc1:MaskedEditValidator>

Open in new window

LVL 33
Who is Participating?
Jorge PaulinoConnect With a Mentor IT Pro/DeveloperCommented:
Have you downloaded the right toolkit for the VS2008 and the toolkit + AJAX essencials for the VS2005 ?
Like Tiago it works fine for me!
Your code looks right. You're trying to validate date in wich format?
Your date is valid if you input in mm/dd/yyyy
jppintoAuthor Commented:
The problem is that the mask is not appearing on the textbox.

Um abraço Tiago (colega do jpaulino)
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

tiagosalgadoConnect With a Mentor Commented:
I've copy your code to a aspx page and i'm seeing the mask, but only when you click in textbox.

jppintoAuthor Commented:
I'm missing something on my page, for sure.

Can you post the complete code of your page trial? Maybe I'm missing some Register Assembly or some reference?

Thanks for your help.

Jorge PaulinoIT Pro/DeveloperCommented:
Olá João, Olá Tiago,
Are you working on VS 2005 or VS2008 ?
jppintoAuthor Commented:
At home I'm working on 2005. At work I've VS 2008.

jppintoAuthor Commented:
Thanks for your help. Mean while I've solved the problem. I had the instalation of the Control Toolkit with problems.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.