Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have the FCKEditor control setup on my ASP.NET page successfully. I am able to bind the control to a database to view the contents, I also know that how to Enter the value in the database.

Now My Question is:
When I save the contents to the database,
Assuming the database contains the HTML tags, how do I then render that field to a desired page using ASP.NET controls?
in total,suggest me how to display the saved Html tags in the database, on my Desired page

Plz help.
Posted
Updated 23-Jan-13 23:26pm
v4

1 solution

You can Bind your data from database to a a paragraph
e.g. column 'content' contains html tags like
HTML
abccde<h1>fgh</h1>

aspx--
ASP.NET
<p id="pContent"  runat="server"></p>
Or
<asp:literal id="ltrContent" runat="server">

.cs--
C#
pageload()
{
//p.Text = dr["content"].tostring();
//Or
ltrContent.Text = dr["content"].tostring();

}
 
Share this answer
 
v2
Comments
Arun kumar Gauttam 24-Jan-13 6:09am    
it is not work,
first thing is pContent tag not support .text property at .cs page,
second is you can not use p tag at .cs page without apply runat tag,
so what can i do
Azziet 24-Jan-13 6:20am    
use <asp:literal id="ltrContent" runat="server">
Azziet 24-Jan-13 6:20am    
use <asp:literal id="ltrContent" runat="server">
Arun kumar Gauttam 24-Jan-13 6:25am    
now it work fine, thanks for, answer
Azziet 24-Jan-13 6:31am    
your welcome Arun1990

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900