Solved

Restrict characters in ASP.NET textbox

Posted on 2006-06-20
2
414 Views
Last Modified: 2012-08-14
I have a textbox on an asp.net webform that i would like to restrict it so on certain characters can be entered.  I only want to allow a-z (upper and lower) and 0-9.  Can i do this with a validation control?
0
Comment
Question by:Mike_Stevens
2 Comments
 
LVL 7

Accepted Solution

by:
whityum earned 500 total points
ID: 16944398
RegEx one, use this as the expression:

[^a-z0-9]
0
 

Author Comment

by:Mike_Stevens
ID: 16944855
thanks...that is exactly what i was looking for.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

22 Experts available now in Live!

Get 1:1 Help Now