tags:

views:

143

answers:

4

I've got a textbox where the user can enter text that includes html markup.

Of course, when the page does anything that involves a postback, it breaks (error 500) because the parser thinks the html code in the textbox is a hack attempt.

Now, I know there is a way to allow it, but I can't for the life of me remember.

Help?

I'm using Visual Studio 2008, VB.NET, in case it's relevant.

Enjoy Random

+3  A: 

at top of page:

<%@ Page ValidateRequest='False' %>
Jimmy
+2  A: 

I believe setting "ValidateRequest=False" in your page directive should solve it.

womp
+1  A: 

You can disable request validation as :

<%Page Language="C#" validateRequest="false" %>

or encode HTML tags at client side before posting form to server.

Canavar
Thanks.The end solution is that we're going to use something like TinyMCE for it, but we need a quick solution for the moment.
Random
+1  A: 

You can solve this issue by disabling validaterequest <%@ Page Language="C#" ValidateRequest="false" %>

Jayaraj