New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

    Setting Content

    Via the Content property from code-behind

    Declaratively

    RadEditor provides 2 different ways to set its content:

    1. Setting the content programmatically:
      RadEditor1.Content = "<strong>Sample HTML Content Loaded via the Content property</strong>."
    2. Inline in the RadEditor declaration: RadEditor offers to set content directly in the ASPX or ASCX file

      <telerik:RadEditor runat="server" ID="RadEditor2">
              
      <Content>
                  
              <strong>Sample HTML content set inline in the RadEditor declaration</strong>
              
      </Content>
      </telerik:RadEditor>

    Related Resources

    • DefaultCS.aspx
    • DefaultCS.aspx.cs
    <%@ Page Theme="Default" Language="C#" CodeFile="DefaultCS.aspx.cs"Inherits="Telerik.Web.Examples.Editor.Default.DefaultCS"  %>
     
    <!DOCTYPE html>
    <head runat="server">
        <title>Telerik ASP.NET Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
        <div class="demo-containers">
            <div class="demo-container size-medium">
                <h2>Via the Content property from code-behind</h2>
                <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" Height="200px" Width="600px" SkinID="MinimalSetOfTools">
                </telerik:RadEditor>
            </div>
            <div class="demo-container size-medium">
                <h2>Declaratively</h2>
                <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor2" Height="200px" Width="600px" SkinID="MinimalSetOfTools">
                    <Content>
                        <strong>Sample HTML content set inline in the RadEditor declaration</strong>
                    </Content>
                </telerik:RadEditor>
            </div>
        </div>
        </form>
    </body>
    </html>

    Support & Learning Resources

    Find Assistance