Raised on the server when a user clicks an HtmlButton control on the browser.
[Visual Basic] Overridable Protected Sub OnServerClick( _ ByVal e As EventArgs _ ) [C#] protected virtual void OnServerClick( EventArgs e ); [C++] protected: virtual void OnServerClick( EventArgs* e ); [JScript] protected function OnServerClick( e : EventArgs );
This event causes a round-trip to occur from the client. It is 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.
CAUTION This HtmlButton control will raise an exception at runtime if a developer attempts to creat an OnServerClick handler and the control is not nested within a HtmlForm server control.
HtmlButton Class | HtmlButton Members | System.Web.UI.HtmlControls Namespace