Numbers or letters in a TextBox

Discussion in 'ASP .Net Building Controls' started by PABLIN, Aug 26, 2003.

  1. PABLIN

    PABLIN Guest

    How I can have a TextBox that to only lets me enter
    letters or numbers?
     
    PABLIN, Aug 26, 2003
    #1
    1. Advertisements

  2. PABLIN

    Dune Guest

    stick a regular expression validator in to validate the
    contents of the textbox and then set the
    validationexpression property of the validator control to
    allow only letters or numbers.

    check out this link for info on regular expressions:

    http://msdn.microsoft.com/library/default.asp?
    url=/library/en-
    us/cpgenref/html/cpconregularexpressionslanguageelements.as
    p
     
    Dune, Aug 28, 2003
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.