1

I am using c# , asp.net.

I have a textbox in which gets pre loaded with the values from DB. These values contains some special characters Eg.Llúria

I get error -

A potentially dangerous Request.Form value was detected from the client (SBItem:ItemBoxContentsDefinition:SecondaryOptio nSummary:_ctl12:_ctl5="...oger de Llúria, Barcelona...").

What could be the way , I could save it as what it is in textbox ?

Edit 1 : I applied validateRequest=false

still getting same error.

<%@ Page language="c#" AutoEventWireup="false" Inherits="TAN.Pages.BackOffice.BookingManagement.BookingDetails" ValidateRequest="false" %>
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
C Sharper
  • 8,284
  • 26
  • 88
  • 151
  • Does this answer your question? [A potentially dangerous Request.Form value was detected from the client](https://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client) – GSerg Apr 20 '21 at 04:27
  • @GSerg no. getting error with that also – C Sharper Apr 20 '21 at 04:33
  • Then why did you accept an answer that tells you to do [just one of the things](https://stackoverflow.com/a/3368769/11683) that are listed in the duplicate, not even mentioning all the other things? – GSerg Apr 20 '21 at 06:26

1 Answers1

2

Go to web.config and set

<httpRuntime requestValidationMode="2.0"/>

Reference

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291