When I input some html tag like < b> or < test> (without the space after “<“) in my TextBoxes, When I submit the form I got the issue:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server.
The status code returned from the server was: 500
I don’t want to set the “ValidateRequest” false, because of security problems.
I thought in make some kind of javascript function inserting a space after “<“, this could work…I guess.
Any idea?
You can escape your input using javascript before posting it back.
See existing answers:
On the c# side use
HttpUtility.HtmlDecode(string)to decode your text back.