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

Adding RadEditor dynamically to a page


Add RadEditor programmatically to a page.


You can place a placeholder in your ASPX/ASCX template, e.g.

 <asp:PlaceHolder runat="server" id="editorPlace" />  

and then, in Page_Load, instantiate a new Editor and add it to the controls collection of the placeholder. All properties of the edit can be set in Page_Load, e.g.

private void Page_Load(object sender, System.EventArgs e)
    RadEditor editor = new RadEditor();
    editor.ID = "RadEditor1";
    //editor.ToolsFile = "~/<folder>/ToolsFile.xml";
    editor.Enabled = true;
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim editor As RadEditor = New RadEditor
    editor.ID = "RadEditor1"
     //editor.ToolsFile = "~/<folder>/ToolsFile.xml"
    editor.Enabled = True
End Sub
In this article