System.Web.UI.WebControls.TextBox.OnTextChanged Method

Raises the TextBox.TextChanged event. This allows you to handle the event directly.

Syntax

protected virtual void OnTextChanged (EventArgs e)

Parameters

e
A EventArgs that contains event information.

Remarks

The TextBox.TextChanged event is raised when the content of the text box changes between posts to the server.

Note:

A System.Web.UI.WebControls.TextBox control must persist some values between posts to the server for this event to work correctly. Be sure that view state is enabled for this control.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The TextBox.OnTextChanged(EventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0