How to add spellchecking to any .net App or Web-Page using C#

ASPNetSpell (found in AspNetSpell.dll ) can be used to add spellchecking to many types of C# project. In this tutorial we will show you how to add spell specking to:

Now is a good time to download AspNetSpell and add it to your project, so you can follow the steps closely »


C# Spell Check

C# is an ideal language to develop a spellchecker. Its is fast, stable, strongly typed and allows the complex data-structures required to perform advanced spell-checking tasks such as fuzzy logic and phonetic scoring.

ASPNetSpell is the industry leading spellchecking library for C# developers. It differs from other free, simple spellchecking libraries in that:

  1. ASPNetSpell never sends you data off server. Many other spellchecking solutions simply cheat by sending the data offsite to 3rd party servers such as google. This makes ASPNetSpell more stable and secure than its competition
  2. ASPNetSpell can used easily in website development, because of its 3 main web-control: “SpellTextBox” , “SpellAutomator” and “SpellButton”. All of these controls are compatible with Razor, ashx, aspx , MVC and good-old Web-Forms:
    SpellTextBox is just like a normal TextBox control - except that spellchecking “as-you-type” is implemented for all major browsers since IE5. In addition, the spellchecking dictionaries and behavior can be modified by the developer using C#, ASPX or MVC code.
    SpellAutomator automatically adds the SpellTextBox to any or all TextAreas and Inputs on an HTML page without requirement to modify the original code. It is ideal for adding spellchecking as an “upgrade” to a website or intranet. The button is added and set up on your page using pure c# code.
    SpellButton is a button, link or image that when clicked - opens a MS-Word style spellchecking dialog window - including grammar checking! This spellchecking dialog is very robust - and can be used to spellcheck any or many textarea, field, dom element - or even an entire page. The button can be added to your page and modified using pure C#.
  3. ASPNetSpell can be used by C# developrers to make custom desktoop and server spellchecker apps and services using its robust ASPNetSpell.SpellChecker Class.



How to Add SpellChecking to .Net Web Pages using C#

  1. Download and unzip AspNetSpell to a convenient location on your hard disk.
  2. Add the ASPNetSpell.dll to your Visual Studio toolbox ( help... ). You can do this easily by just double clicking on the Install.vscontent file
  3. Copy the directory called AspNetSpellInclude to the root folder of your website project. The easiest way to do that is to simmply drag it the folder into your Solution Explorer. (help)

To Add contextual (red-wiggly-underline SpellChecking to any TextBox

Drag the SpellTextBox into the web form in place of any normal multi-line text box. The SpellTextBox can be onfudured with c# code-behind using the SpellTextBox Properties

To Add contextual (red-wiggly-underline SpellChecking multiple of all TextBoxes

Drag the SpellAutomator control onto you page - and set the FieldToSpellCheck property to the id (or comma separated list of ids) to the field you want to add spellchecking to.

To add a button that spellchecks any HTML Elements

To select the field(s) that AspNetSpell will spell check, change the FieldsToSpellCheck property.

Working Example:

Download AspNetSpell »