J
John Comber
Hi,
I've a simple web form (webform1.aspx) with a text box &
button. The click event of the button appends the value
of the text box to the URL and redirects to
webform2.aspx. This then gets the value of the text box
from the query string.
I'd like to keep validateRequest=true to prevent malicious
input. If the user does enter some invalid text, is there
a way of catching the HttpRequestValidationException
before it bombs out to the browser? I would then like to
inform the user that their input is invalid.
Alternatively, if I set validateRequest=false, is there a
method to call (like
System.Web.HttpRequest.ValidateString) that will do this
so that I can catch any exceptions that are thrown?
Thanks in advance,
Regards
John.
I've a simple web form (webform1.aspx) with a text box &
button. The click event of the button appends the value
of the text box to the URL and redirects to
webform2.aspx. This then gets the value of the text box
from the query string.
I'd like to keep validateRequest=true to prevent malicious
input. If the user does enter some invalid text, is there
a way of catching the HttpRequestValidationException
before it bombs out to the browser? I would then like to
inform the user that their input is invalid.
Alternatively, if I set validateRequest=false, is there a
method to call (like
System.Web.HttpRequest.ValidateString) that will do this
so that I can catch any exceptions that are thrown?
Thanks in advance,
Regards
John.