*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site)....

Discussion in 'ASP .Net' started by \A_Michigan_User\, Aug 12, 2006.

  1. *WITHOUT* using: ValidateRequest="False" for the whole page (or my whole
    site)....

    How would I trap/detect that a textBox contains some illegal characters?

    (I'm using asp.net v1.1 and vb.net)

    Thanks.
     
    \A_Michigan_User\, Aug 12, 2006
    #1
    1. Advertising

  2. \A_Michigan_User\

    Siva M Guest

    How about using RegularExpressionValidator?

    ""A_Michigan_User"" <> wrote in message
    news:...
    *WITHOUT* using: ValidateRequest="False" for the whole page (or my whole
    site)....

    How would I trap/detect that a textBox contains some illegal characters?

    (I'm using asp.net v1.1 and vb.net)

    Thanks.
     
    Siva M, Aug 12, 2006
    #2
    1. Advertising

  3. Wouldn't I have to set ValidateRequest="False" for the whole page ... then
    write my own RegEx code?

    I'm trying to do this *WITHOUT* using: ValidateRequest="False" at all.

    Like this:
    Don't use ValidateRequest="False" at all..
    Allow MS to check and generate the error.
    I trap the error and can work around it.

    I'm beginning to think that I'm stuck either way I do it:
    I have to use the very dangerous "allow all characters in all textBoxes
    on my entire page".
    or
    Forbid the dangerous characters ...but then everyone sees the ugly error
    msg.

    Wouldn't ValidateRequest have been infinitely more useful like this:
    ValidateRequest="Remove" (Strip-out all the dangerous characters...
    and no error is generated)
    ValidateRequest="Trap" (Just give me a yes/no if this textBox contains
    illegal chars... and I'll do the reset)

    What are "illegal characters" anyway? MS seems to have an exact definition.
    (Otherwise how could it generate the error?)



    "Siva M" <> wrote in message
    news:...
    > How about using RegularExpressionValidator?
    >
    > ""A_Michigan_User"" <> wrote in message
    > news:...
    > *WITHOUT* using: ValidateRequest="False" for the whole page (or my whole
    > site)....
    >
    > How would I trap/detect that a textBox contains some illegal characters?
    >
    > (I'm using asp.net v1.1 and vb.net)
    >
    > Thanks.
    >
    >
     
    \A_Michigan_User\, Aug 21, 2006
    #3
    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. Martin Colmenares

    ValidateRequest="false" error

    Martin Colmenares, Jun 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,022
    Martin Colmenares
    Jun 27, 2003
  2. Tim Zych
    Replies:
    2
    Views:
    25,516
    Tim Zych
    May 16, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: validateRequest=&quot;false&quot; not working in web.config or page directive

    Phil Winstanley [Microsoft MVP ASP.NET], May 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    644
    Phil Winstanley [Microsoft MVP ASP.NET]
    May 16, 2004
  4. \A_Michigan_User\

    ValidateRequest=False HtmlEncode and The Best Method

    \A_Michigan_User\, Sep 5, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    939
    aamirghanchi
    Apr 1, 2010
  5. Edwin Knoppert
    Replies:
    0
    Views:
    884
    Edwin Knoppert
    Oct 19, 2006
Loading...

Share This Page