validating TextBox In

Posted on 2011-05-01
Last Modified: 2012-08-13
How can i be able to validate
textbox's  text
and restrict the user only to enter
alphabets or number
in a particular text box.

Please provide me code for doing this
Question by:code_me
    LVL 9

    Expert Comment

    LVL 39

    Expert Comment

    by:Pratima Pharande
    you can use validator to your textbox, you can use regularexpressionvalidator, because it is simple with this ,

    you just place regularexpressionvalidator on your page and set Controltovalidate property of the validator to textbox at  properties. Then set validation expression property of validator to [0-9a-zA-Z]* .
    LVL 9

    Accepted Solution

    LVL 9

    Expert Comment

    if you are using a windows based application ( i guess so ) you would not find regular expression validator in it.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    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…

    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

    13 Experts available now in Live!

    Get 1:1 Help Now