开发者

Allow html in asp.net textboxes

I put ValidateRequest="false" in my page directive but the page acts like it's not posting back. If I remove the html then it posts back fine.

Using the text boxes inside an update panel shouldn't make a difference right?

I'm trying to store text in my database with html formatting.

开发者_如何学Python

Again, I am using an update panel.


You're probably getting an error behind the scenes. If you take out the update panel do you see a nice YSOD?

If this is a .Net 4.0 application, you'll need to change the web config in order to allow for unsafe characters, even though you turned ValidateRequest to false.

The requisite change looks like this: <httpRuntime requestValidationMode="2.0" />


Apparently you need to put <httpRuntime requestValidationMode="2.0" /> in web.config to be able to use the ValidateRequest feature in the page directive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜