Spellchecking Dynamic Controls


How to add RadSpell dynamically to the page and/or how to spellcheck dynamic controls.


To spellcheck dynamic controls:

  • Create dynamic instances of both RadSpell and the control you wish to spellcheck.

  • Add both controls to a placeholder control inside your ASPX / ASCX template.

You need to set the ControlToCheck property after you add both controls to the Controls collection of their parent!

<form id="form2" runat="server">
   <asp:ScriptManager ID="Scriptmanager1" runat="server">
   <asp:PlaceHolder runat="server" ID="PlaceHolder1" />
protected void Page_Load(object sender, EventArgs e)
    TextBox textArea = new TextBox();
    textArea.ID = "TextBox1";
    RadSpell spellChecker = new RadSpell();
    spellChecker.ID = "RadSpell1";
    spellChecker.ControlToCheck = textArea.ClientID;
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim textArea As New TextBox()
    textArea.ID = "TextBox1"
    Dim spellChecker As New RadSpell()
    spellChecker.ID = "RadSpell1"
    spellChecker.ControlToCheck = textArea.ClientID
End Sub
In this article
Not finding the help you need? Improve this article