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

Server-Side SpellCheck using RadSpell

HOW-TO

SpellCheck custom text on the Server.

SOLUTION

Sometimes it is useful to execute a silent SpellCheck on the server and determine whether there are spelling mistakes in the text. The code bellow demonstrates how to achieve this functionality:

protected void Page_Load(object sender, EventArgs e)  
{  
    SpellChecker spell = new SpellChecker(Server.MapPath("~/App_Data/RadSpell"));  
    spell.Text = "Textt to Checkk";  
    spell.CheckText();  
    SpellCheckErrors errors = spell.Errors;  
    foreach (SpellCheckError error in errors)  
    {  
        Page.Response.Write(error.MistakenWord.ToString()+"</br>");  
    }  
} 

Note that, the "Server.MapPath("~/App_Data/RadSpell")" is the path to the dictionaries' folder.

In this article