Solved

How to update content with HTML tags  to database.

Posted on 2013-06-16
7
224 Views
Last Modified: 2013-07-31
Hi,
I developed .Net 3.5 web application using VS 2010.
In .NET 3.5 web application I am doing the Database update with grid view data by stored procedure. The content I am trying to update from grid view column has HTML tags.

It is giving error:Potentially dangerous request.I am doing the page validation before submitting it to server.

How to update the page content with html tags.
Thanks
0
Comment
Question by:KavyaVS
  • 4
  • 3
7 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 39251144
Add this to your web.config:

<system.web>
    <pages validateRequest="false" />
</system.web>
0
 

Author Comment

by:KavyaVS
ID: 39251152
I can't.I have to do page validation.

I am doing Server.HtmlEncode("<data with html tags/>") before saving it.
But I am getting the same error.

Any other suggestions please.
Thanks
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 39251155
are you using MVC?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:KavyaVS
ID: 39251161
No.
 It's .Net 3.5 web application.

Thanks
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39251184
0
 

Author Comment

by:KavyaVS
ID: 39251921
The example provided was for MVC.  How to use it in web application.

Thanks
0
 

Author Closing Comment

by:KavyaVS
ID: 39372028
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question