Reputation: 2140
When I use a HTML-element in my textboxes I was getting this error:
To fix this error, I did this:
ValidateRequest="false"
at the top of the .aspx page.<httpRuntime targetFramework="4.0" requestValidationMode="2.0" />
to the webconfig file.After doing this, the error above didnt appear, and the HTML-elements that I used were shown with the markup.
For example: I used the <b>Test</b>
elements in the textbox, and this was showed in a label as:
Test
But what I would like to have is, when someone adds HTML elements to my textbox, the error shouldn't appear, and the elements shouldn't be converted. So the label must show:
<b>Test</b> instead of Test (which is BOLD)
What can I do to make it like that?
Upvotes: 0
Views: 152