Resolving html tags in postback

I have a text box in which the user can enter text that includes html markup.

Of course, when a page does something related to postback, it breaks (error 500), because the parser considers that the html code in the text field is an attempt to hack.

Now I know that there is a way to resolve this, but I cannot, so that life remembers me.

reference

I am using Visual Studio 2008, VB.NET, if that matters.

Enjoy Random

+1
source share
4 answers

at the top of the page:

<%@ Page ValidateRequest='False' %>
+5
source

I believe that setting "ValidateRequest = False" in your directive should solve the problem.

+2
source

:

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

HTML .

+1

You can solve this problem by disabling validaterequest

+1
source

Source: https://habr.com/ru/post/1711387/


All Articles