validate Multiline text box

Discussion in 'ASP .Net Web Controls' started by ashwin kumar via .NET 247, Aug 11, 2004.

  1. i have a multiline text box and would like to restrict its maximum size to 200. i am using a regular expression ^(.|\\n){1,512}$.This expression validates includes spaces.Is there any regExp which can validate text box excluding spaces for given length.
    --------------------------------
    From: ashwin kumar

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>V7zpnQ5gr0+C6qHv3zf3Ig==</Id>
    ashwin kumar via .NET 247, Aug 11, 2004
    #1
    1. Advertising

  2. ashwin kumar via .NET 247

    Mythran Guest

    You could just use the MAXLENGTH attribute, could you not?

    Mythran


    "ashwin kumar via .NET 247" <> wrote in message
    news:...
    > i have a multiline text box and would like to restrict its maximum size to 200.

    i am using a regular expression ^(.|\\n){1,512}$.This expression validates
    includes spaces.Is there any regExp which can validate text box excluding spaces
    for given length.
    > --------------------------------
    > From: ashwin kumar
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>V7zpnQ5gr0+C6qHv3zf3Ig==</Id>
    Mythran, Aug 11, 2004
    #2
    1. Advertising

  3. ashwin kumar via .NET 247

    Swap Guest

    Hi,
    But it is not working with multiline textbox means textarea if you have any
    other idea except javascript then tell us i am interested in it.

    "Mythran" <> wrote in message
    news:%...
    > You could just use the MAXLENGTH attribute, could you not?
    >
    > Mythran
    >
    >
    > "ashwin kumar via .NET 247" <> wrote in message
    > news:...
    > > i have a multiline text box and would like to restrict its maximum size

    to 200.
    > i am using a regular expression ^(.|\\n){1,512}$.This expression validates
    > includes spaces.Is there any regExp which can validate text box excluding

    spaces
    > for given length.
    > > --------------------------------
    > > From: ashwin kumar
    > >
    > > -----------------------
    > > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    > >
    > > <Id>V7zpnQ5gr0+C6qHv3zf3Ig==</Id>

    >
    >
    Swap, Aug 12, 2004
    #3
  4. ashwin kumar via .NET 247

    Mythran Guest

    Haven't tested it...but here is one :)

    ^([^ ]|\n){1,512}$

    Mythran


    "Swap" <> wrote in message
    news:...
    > Hi,
    > But it is not working with multiline textbox means textarea if you have any
    > other idea except javascript then tell us i am interested in it.
    >
    > "Mythran" <> wrote in message
    > news:%...
    > > You could just use the MAXLENGTH attribute, could you not?
    > >
    > > Mythran
    > >
    > >
    > > "ashwin kumar via .NET 247" <> wrote in message
    > > news:...
    > > > i have a multiline text box and would like to restrict its maximum size

    > to 200.
    > > i am using a regular expression ^(.|\\n){1,512}$.This expression validates
    > > includes spaces.Is there any regExp which can validate text box excluding

    > spaces
    > > for given length.
    > > > --------------------------------
    > > > From: ashwin kumar
    > > >
    > > > -----------------------
    > > > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    > > >
    > > > <Id>V7zpnQ5gr0+C6qHv3zf3Ig==</Id>

    > >
    > >

    >
    >
    Mythran, Aug 12, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cw
    Replies:
    1
    Views:
    619
    James J. Foster
    Jun 27, 2003
  2. Michael Tanner

    Different fonts in multiline text box...

    Michael Tanner, Jul 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    586
    Steve C. Orr, MCSD
    Jul 25, 2003
  3. Gnarlodious
    Replies:
    4
    Views:
    17,553
    elizas
    May 5, 2010
  4. ashwin kumar via .NET 247

    validate Multiline text box

    ashwin kumar via .NET 247, Aug 11, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    105
    ashwin kumar via .NET 247
    Aug 11, 2004
  5. dale zhang
    Replies:
    8
    Views:
    403
    Tintin
    Nov 30, 2004
Loading...

Share This Page