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

A

\A_Michigan_User\

*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.
 
S

Siva M

How about using RegularExpressionValidator?

*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

\A_Michigan_User\

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?)
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top