Nanospell Spell Checking Software Components
JavaScript jQuery CKEditor TinyMCE PHP ASP.Net Classic ASP

The ASP.Net Spell Checker

ASP.Net MaxLength & Character Count for SpellTextAreas

Understanding MaxLength

In ASP.Net the MaxLength property does not normally affect Multiline TextBoxes.

With ASPNetSpell - the MaxLength property can be applied to enforce a maximum length of input at the clieny side


<ASPNetSpell:SpellTextBox ID="SpellTextBox1" runat="server"  MaxLength="200">..</ASPNetSpell:SpellTextBox>

Adding a Character Count

Almost any conventional "Character Count" script can also be applied. We have provided one in the demo below for your convenience.

Full ASPX Source Code with Character Count

<%@ Register Assembly="ASPNetSpell" Namespace="ASPNetSpell" TagPrefix="ASPNetSpell" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
    <title>Max Length Demo for ASP-Net-Spell</title>
<form id="form1" runat="server">

<ASPNetSpell:SpellTextBox ID="SpellTextBox1" runat="server"  MaxLength="200">
<div id='MyCharCount1'></div>

<script type='text/javascript'>
  function CharacterCount(TextArea,FieldToCount){
	var myField = document.getElementById(TextArea);
	var myLabel = document.getElementById(FieldToCount); 
	if(!myField || !myLabel){return false}; // catches errors
	var MaxChars =  myField.maxLengh;
	if(!MaxChars){MaxChars =  myField.getAttribute('maxlength') ; }; 	if(!MaxChars){return false};
	var remainingChars =   MaxChars - myField.value.length
	myLabel.innerHTML = remainingChars+" Characters Remaining of Maximum "+MaxChars