Click here to Skip to main content
11,922,589 members (31,581 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
hello guys,

I'm need to format a textbox so that it displays '__/__/___' -- MM/DD/YEAR. Is there a built-in function that facilitates this functionality, or should I just manually fight thru it?

THanks in advance.
Posted 11-Oct-12 3:41am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use ajax calander in

First rgister ajax tool kit in the .aspx page
<![CDATA[<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>]]>

Then take Script manager

<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">

Then Use code given blow

<asp:textbox id="txtFrom" runat="server" maxlength="10" onblur="CalculateDays();" width="100" xmlns:asp="#unknown"></asp:textbox>
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

There is maskedinput jquery plugin which probably serve your purpose.[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100