?
Solved

How to update content with HTML tags  to database.

Posted on 2013-06-16
7
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

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

Thanks
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 1000 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

764 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