UltimateSpell Class Library

UltimateSpell.ClickOK Event

Raised when the user clicks the OK button on the spell check dialog box.

You have to set the PostBackOnOK property to True to let the control postback to server.

In VS.NET, you can double-click the Spell Check button to generate the event handler method automatically.

If you don't use VS.NET, you will need to edit the event handler method as in the example code for the ClickOK Event.

[Visual Basic]
Public Event ClickOK As ClickOKEventHandler
[C#]
public event ClickOKEventHandler ClickOK;

Event Data

The event handler receives an argument of type ClickOKEventArgs containing data related to this event. The following ClickOKEventArgs property provides information specific to this event.

PropertyDescription
Changed Whether Change or Change All button is clicked on the spell check dialog box.

Example

This sample shows how to handle the ClickOK event when the PostBackOnOK property is set to True, and the user clicks the OK button on the spell check dialog box.

private void UltimateSpell1_ClickOK(object sender, Karamasoft.WebControls.UltimateSpell.ClickOKEventArgs e) 
{
    if (e.Changed)
        lblStatus.Text = "Text CHANGED during spell checking.";
    else
        lblStatus.Text = "Text NOT CHANGED during spell checking.";
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
    //
    // CODEGEN: This call is required by the ASP.NET Web Form Designer.
    //
    InitializeComponent();
    base.OnInit(e);
}

/// 
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// 
private void InitializeComponent()
{    
    this.UltimateSpell1.ClickOK += new Karamasoft.WebControls.UltimateSpell.UltimateSpell.ClickOKEventHandler(this.UltimateSpell1_ClickOK);
    this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

See Also

UltimateSpell Class | Karamasoft.WebControls.UltimateSpell Namespace