Solved

tinymce into SQL

Posted on 2012-03-22
1
415 Views
Last Modified: 2012-05-14
Hi,

I have successfully setup Tinymce on my text area and it displays text fine, but when I submit text in it to be saved into my SQL database it removes the tags <p> and replaces with &lt;p&gt;

Is there anyway to stop this??

Code Below

string LongArticle = txtArticle.Text;

tring query1 = "UPDATE smartChimps_news SET date=convert(datetime,'" + dateNew + "',103) , heading='" + Heading + "', LongArticle ='" + LongArticle + "' WHERE newsid='" + newsid + "'";



Regards

Michael
0
Comment
Question by:hayward03
1 Comment
 
LVL 9

Accepted Solution

by:
gery128 earned 500 total points
ID: 37753389
You may want to decode text before inserting to database.
Try to use HtmlUtility.HtmlDecode method
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now