How do I submit HTML from a text box

Hi There
I have a multiline textbox that I am want to use to save html in the db that will be diplayed later as a divs innerhtml.

When I submit my for I get a ASP.Net error saying that potetially usafe content has been submitted.

How do I save html as not to get this message.

// Insert code
   SkinMan.Code =txtCode.Text;//failing here
//display code
 dvLinks.InnerHtml = skinman.Code;

Open in new window

Who is Participating?
You can  set the Page ValidateRequest="false" and use HttpUtility.HtmlEncode() if you want to supress this message
This is a security feature to prevent cross site script attack
You need to use htmlencoding in to prevent this message
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.