In my asp.net website I create user with their details, If suppose the surname of the user is
Sam's
then when I edit the user the display in the text box is Sam's
but in database it is stored as Sam's, and When I just try to update name as Sam's then i get the error below, How should I show the name in the text box txt_EditLastName.Text = gvrow.Cells[2].Text;
A potentially dangerous Request.Form value was detected from the client (ctl00$MainContent$txt_EditLastName="Sam's").
I used a find and replace of ' with `
The Grave accent looks the same and can be stored in SQL databases without messing them up. The grave accent is usually found above the Tab button on your keyboard, to the left of the numbers.
Hope this helps.
I got this error because Visual Studio 2010 added a little bit of security. To work around it you need to add
ValidateRequest="false"
to the page directive or add<pages validateRequest="false" />
in theweb.config
file. I put it in the wrong spot at first, so make sure you put that in the<system.web>
area of yourweb.config
file.This link will help. http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_potentially_dangerous.htm