Allowing html tags in a postback


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.


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

Enjoy Random


at top of page:

<%@ Page ValidateRequest='False' %>


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


You can disable request validation as :

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

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


You can solve this issue by disabling validaterequest


  • Dropping support for JRE 1.3
  • Why dsofile.dll still need Office Installation?
  • HTMLcollection 0 list length, [n] returns undefined, converting to an array returns an empty array
  • Theme in user control
  • How to shorten this expression using regex
  • Sql indexes vs full table scan
  • Combining many rectangles into fewer rectangles
  • C: Custom strlen() library function
  • Ncurses No Output
  • opengl window freezing during move/resize
  • Is there an HTML code that can make my background picture transparent and my text non-transparent?
  • not able to create VC++ project, with VS11
  • Visual studio 2015 keystroke with mouse button
  • Efficient User-Agent Regex to find Safari in Python
  • Get localized short date pattern as String?
  • How to pass solution folder as parameter in command line arguments (for debug)?
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • How to programatically 'login' a user based on 'remember me' cookie when using j
  • Python ImageIO Gif Set Delay Between Frames
  • CSS bleed-through with cfinput type=“datefield”
  • ASP.NET MVC 2 Preview 2 - display directory list rather than home/index
  • Android changing fragment order inside FragmentPagerAdapter
  • Multicolored edittext hint
  • Copy to all folders batch file?
  • Textfile Structure (tables)
  • Typescript - Unable to get 'import' statement to function
  • Regex thinks I'm nesting, but I'm not
  • req.body is undefined - nodejs
  • Bug in WPF DataGrid
  • Running a C# exe file
  • How to make Safari send if-modified-since header?
  • How to pass list parameters for each object using Spring MVC?
  • WPF Applying a trigger on binding failure
  • Acquiring multiple attributes from .xml file in c#
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • How can I remove ASP.NET Designer.cs files?
  • JaxB to read class hierarchy
  • Running Map reduces the dimensions of the matrices
  • java string with new operator and a literal