HTML Editor for ASP.NET AJAX Professional Edition
CountStateChanged Property
Server ReferenceWinthusiasm.HtmlEditorHtmlEditorCountStateChanged
The name of a JavaScript function on the page to call when a count state changes.
Declaration Syntax
C#
public string CountStateChanged { get; set; }
Remarks
The client-side editor will call the named JavaScript function on the page whenever a count state changes. This allows the developer to take appropriate action, such as perhaps enabling and disabling a button on the page.

The count state types that might have changed are:

  • warning (count has exceeded the warning level)
  • locked (count has reached or exceeded its limit)
  • error (count has exceeded its limit)

The countStateChangeInfo object passed as an argument contains members for each changed state type which then contain a value member with its new value.

Examples
Set the property declaratively in the HtmlEditor tag:
CopyC#
CountStateChanged = "MyCountStateChangedHandler"
Page JavaScript function:
CopyC#
function MyCountStateChangedHandler(editor, countStateChangeInfo)
{
    if (countStateChangeInfo.error)
       MyDisableSaveButtonMethod(countStateChangeInfo.error.value);

       ...
}

Assembly: Winthusiasm.HtmlEditor (Module: Winthusiasm.HtmlEditor) Version: 2.7.0.0 (2.7.0.0)