I’m building a footnote editor for a specific need and I need a drop list that shows special characters such as a dagger (†). Not sure if it matters, but the drop list is in a ajax modal popup form. Whenever I try to display the popup form, I get the error “A potentially dangerous Request.Form value was detected from the client (ctl00$MainContent$ucFootNoteList$DropDownList1=”*, †″).“
I tried adding
<httpRuntime requestValidationMode=”2.0″ />
to the Web.config file.
How do I show a special character in this scenario without this error coming up?
You could set the
validateRequestproperty on the Page header of the corresponding WebForm to disable request validation and allow posting HTML characters:This could also be done globally for all WebForms in the web.config:
Here’s
an articleon MSDN where you could read more about request validation in ASP.NET.