Oct 13, 2009 at 7:33 AM
Edited Oct 13, 2009 at 7:36 AM
You can save the RTE Content by using Hidden Field control and little java script. I found this answer before from i-forgot-his-name in this site also (sorry i forgot his name) and i did small modification.
Here is the sample code.
- lblMessage (Label)
- btnView (Button)
- H1 (Hidden Field)
In HTML View:
//H1 is the ASP HiddenField Control
var elem = document.getElementById('H1');
elem.value = richeditor.toHtmlString();
<!-- Aside from this tag -->
<!-- I put Button control to trigger the java script function doAction() and the codebehind-->
In Code Behind (C#):
void btnView_Click(object sender,
//To put it back the contents in the RTE Control
lblMessage.Text = H1.Value;
I hope It will help you. Courtery of i-forgot-his-name.