0

i'm trying to creat a form which contain textboxs, and i want to use one to fill in date by clicking in that zone i use asp.net/vb

thks for all yr support

1 Answer 1

1

You could use the MaskedEdit control from the AJAX control toolkit.

Sample code:

<asp:TextBox ID="date1" name="date1" runat="server"></asp:TextBox>

<ajaxToolkit:MaskedEditExtender
    TargetControlID="date1" 
    Mask="99/99/9999"
    MessageValidatorTip="true" 
    OnFocusCssClass="MaskedEditFocus" 
    OnInvalidCssClass="MaskedEditError"
    MaskType="Date" 
    InputDirection="RightToLeft" 
    AcceptNegative="Left" 
    DisplayMoney="Left"
    ErrorTooltipEnabled="True"/>

Take a look at this demo: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/MaskedEdit/MaskedEdit.aspx

Sign up to request clarification or add additional context in comments.

2 Comments

i tried to do like it's demonstrated in video but it doesn't work. i did : </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <br /><br /> <asp:TextBox ID="date1" runat="server"></asp:TextBox> <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="date1"> </asp:CalendarExtender> </div> </form> </body> </html>
No. You're doing it the wrong way. Look at the edited answer above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.