Solved

Mask Edit box in asp.net

Posted on 2006-07-10
4
641 Views
Last Modified: 2006-11-18
I have a text box and need the user to enter in a time.  Is there a way to make a text box only allow a certain formate.  I need the date to be entered with the : in it.  An example is 9:58.  How can I check it is a number and that they enter in :.

Thanks
0
Comment
Question by:running32
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
daniel_balla earned 500 total points
ID: 17076061
Hi running32,
you can check it with a RegularExpressionValidator, with an expression such as ^\d{2}\:\d{2}$

Cheers!
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 17081375
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 17081387
0
 
LVL 9

Expert Comment

by:daniel_balla
ID: 17082334
just a quick correction, better use the expression  ^\d{1,2}\:\d{1,2}$  as this will allow single digits too.

Cheers
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now