Hi Dave,
CuteEditor is an online web-based WYSIWYG HTML editor. It upgrades your simple text area to a rich-text edit box. So you still need a data source to save the formatted data. The CuteEditor will not save the data itself.
We use the Literal control to hold the data for demo purpose. When the user click the submit button, the page post back, the editor visibility is set to false and pass the data to the Literal control. The user can see the editing result. But when the new user click the page, he/she will get the dafault content we predefined.
It's not necessary for you to use Literal control at all.
Below are sample code I suggest you to use:
void Page_Load(object sender, System.EventArgs e)
{
if(! this.IsPostBack )
{
String content = ""; //you can get the data from your data source to populate the editor
Editor1.Text = content;
}
}
public void Submit(object sender, System.EventArgs e)
{
Literal1.Text = Editor1.Text;
strDBConn = ConfigurationSettings.AppSettings["ConnectionString"];
SqlConnection ObjConn = new SqlConnection( strDBConn );
ObjConn.Open();
strSQL = "UPDATE CText SET CTextContent = "+ Editor1.Text +" where CTextId = 1";
SqlCommand ObjCmd = new SqlCommand(strSQL, ObjConn);
objCmd.ExecuteNonQuery();
ObjConn.Close();
}<!-- Inject Script Filtered --><!-- Inject Script Filtered -->
If you have any further question, feel free to tell us.
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx