Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Input mask on a text box?

Reply
Thread Tools

Input mask on a text box?

 
 
Russ
Guest
Posts: n/a
 
      12-29-2003
Is it possible to create a input mask on a text box?

If a user enters a date like this 060103 I would like to see it
automatically converted to 06/01/03. In Access if you set a input mask to
99/99/00;0; when the cursor enters the cell you see __/__/__ . That is the
functionality I am trying to accomplish.

Can it be done?


 
Reply With Quote
 
 
 
 
Tu-Thach
Guest
Posts: n/a
 
      12-29-2003
Not out of the box with ASP.NET. You have to use client-
side script to achieve this functionality or use a third-
party control.

Tu-Thach

>-----Original Message-----
>Is it possible to create a input mask on a text box?
>
>If a user enters a date like this 060103 I would like to

see it
>automatically converted to 06/01/03. In Access if you

set a input mask to
>99/99/00;0; when the cursor enters the cell you see

__/__/__ . That is the
>functionality I am trying to accomplish.
>
>Can it be done?
>
>
>.
>

 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      12-29-2003
Russ wrote:
> Is it possible to create a input mask on a text box?
>
> If a user enters a date like this 060103 I would like to see it
> automatically converted to 06/01/03. In Access if you set a input
> mask to 99/99/00;0; when the cursor enters the cell you see __/__/__
> . That is the functionality I am trying to accomplish.
>
> Can it be done?


Set the Text property of the text box to "__/__/__"
Add a RegularExpressionValidator to the form to get
validation. Use the expression "\d{1,2}/(\d{1,2}/\d{4}|\d{2})"
The automatic conversion is not readily available, though.
You'll have to add your own code for that.

--

Jos Branders


 
Reply With Quote
 
Russ
Guest
Posts: n/a
 
      12-29-2003
I did some looking around and found a great component from a company called
Assisted Solutions. It has everything I was looking for and more.

Here is the URL if anyone else needs something like this:

http://www.assistedsolutions.com

Click on Web Components and you will find it there.

Kudos to them for making this a free download!


 
Reply With Quote
 
Peter Blum
Guest
Posts: n/a
 
      12-30-2003
My product, Peter's Date Package, includes a DateTextBox that specifically
reformats dates, including adding the slashes when omitted. (It has numerous
other features including a popup calendar.) Details are at
http://www.peterblum.com/datecontrols/home.aspx.

--- Peter Blum
www.PeterBlum.com
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)

"Russ" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Is it possible to create a input mask on a text box?
>
> If a user enters a date like this 060103 I would like to see it
> automatically converted to 06/01/03. In Access if you set a input mask to
> 99/99/00;0; when the cursor enters the cell you see __/__/__ . That is

the
> functionality I am trying to accomplish.
>
> Can it be done?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion mask in hex to bit mask Marcin Tyman Ruby 4 05-06-2008 08:15 PM
Input Mask on Text box =?Utf-8?B?RG9u?= ASP .Net 2 05-09-2007 10:37 PM
how to mask an input niv ASP .Net 3 12-29-2004 03:25 AM
Input mask for Text Box Control TBC ASP .Net Web Controls 2 09-13-2004 01:19 PM
[networking] Convert subnet mask <=> mask length 187 Perl Misc 2 07-29-2004 10:31 AM



Advertisments