Click here to Skip to main content
12,247,398 members (57,931 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
ishandeb1.1K
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

use ajax calander in Asp.net


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">
    </asp:scriptmanager>

Then Use code given blow

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

Solution 2

There is maskedinput jquery plugin which probably serve your purpose.

http://plugins.jquery.com/project/maskedinput[^]
  Permalink  

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
Web02 | 2.8.160426.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2016
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