NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HtmlInputButton.AddOnServerClick

Adds an event handler for the OnServerClick event.

[Visual Basic]
Overridable Public Sub AddOnServerClick( _
   ByVal value As EventHandler _
)
[C#]
public virtual void AddOnServerClick(
   EventHandler value
);
[C++]
public: virtual void AddOnServerClick(
   EventHandler* value
);
[JScript]
public function AddOnServerClick(
   value : EventHandler
);

Parameters

value
The new event handler to install for this event.

Remarks

The OnServerClick event is raised on the server when a client clicks a input server control button. This server event does cause a round-trip to occur from the client. It accomplishes this by emitting a custom client-side javascript call to the Web Forms provided ?doPostBack()? framework method.

This server control will raise an exception at runtime if the user attempts to wireup an OnServerClick handler, and the button control is not nested within a server form control.

Note The server-side OnServerClick event is deliberately different from the client-side OnClick event. In the event that a conflict exists between code run with OnServerClick event and code run by a client-side OnClick event, the server side event instructions will override the client-side code.

See Also

HtmlInputButton Class | HtmlInputButton Members | System.Web.UI.HtmlControls Namespace