Solved

Mask Edit box in asp.net

Posted on 2006-07-10
4
654 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

636 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