New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Triggering Spellchecker on Page_Load
Scenario
How to trigger the spellchecker on Page_Load.
Solution
You can trigger the spellcheck on Page_Load, but you have to use a client-side approach:
-
Set the spellcheck ButtonType property to "None"
-
Set the body OnLoad event like this:
ASP.NET
<body onload="setTimeout(function() { $find('<%= RadSpell1.ClientID %>').startSpellCheck(); }, 100);">
<form id="form2" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server" Text="baad speeleng"></asp:TextBox>
<telerik:RadSpell RenderMode="Lightweight" ID="RadSpell1" runat="server" ControlToCheck="TextBox1" ButtonType="None"/>
</form>
</body>