RadEditor for ASP.NET AJAX

RadControls for ASP.NET AJAX

You can save the RadEditor content in an external text or HTML file as well as load the content from an external file in the editor by following the instructions below:

  1. Create an HTML file (test.html) in the root of your web application

  2. Declare RadEditor and an Asp.NET button in your page:

    CopyASPX
    <telerik:radeditor runat="server" ID="RadEditor1" ></telerik:radeditor>
    <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click"  />
  3. To save the RadEditor content in the external HTML file when the Submit button is pressed, add the following code inside the button click eventhandler in the codebehind:

  4. To load the external file content in the RadEditor, read the file content with the ReadFile function and assign the returned string to the Html property of RadEditor in the Page_Load event: