简体   繁体   中英

C# ValidateRequest Work Around

I have one textbox in my entire app that I want to be able to accept html. I don't really want to go through all my pages and add Server.HtmlEncode(textbox.Text).

Is there a work around. I'm using C# and asp.net 4.0 and I know the ValidateRequest stuff changed in 4.0 but I don't know if it can solve my problem. Can it?

You can always mark validateRequest=false at page level. So you can try that on the page containing that particular text-box

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM