Saving RTE Content

Oct 10, 2009 at 5:31 AM


Can you please guid me how to save the content of the RTE to a Word file using

Oct 13, 2009 at 8:33 AM
Edited Oct 13, 2009 at 8:36 AM

Hi Sakthivel,

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.

Controls Needed:

  •     lblMessage (Label)
  •     btnView (Button)
  •     H1 (Hidden Field)

In HTML View:

<script type="text/javascript">

     function doAction()


          //H1 is the ASP HiddenField Control

            var elem = document.getElementById('H1');

            elem.value = richeditor.toHtmlString();                         




<!-- Aside from this tag -->

<cc1:RichTextEditor ID="Rte1" runat="server" />

 <!-- I put Button control to trigger the java script function doAction()  and the codebehind-->

<asp:Button ID="btnView"







In Code Behind (C#):

 protected void btnView_Click(object sender, EventArgs e)


        //To put it back the contents in the RTE Control

        this.Rte1.Text = H1.Value;


        lblMessage.Text = H1.Value;       



I hope It will help you. Courtery of i-forgot-his-name.






Oct 28, 2009 at 12:03 AM
Edited Oct 28, 2009 at 12:04 AM

but the formatting of the text would be lost? correct?


please look at my issue @

Jan 13, 2011 at 1:13 AM

Hi guys, I have a question what  object type is "richeditor"? because Im alerting richeditor.toHtmlString() and it says undefined. :S


I've just download the control and not sure how to use it.  If you have any link that will help me too.