ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources]

G. andrew Duthie; matthew Macdonald

نسخه متنی -صفحه : 873/ 538
نمايش فراداده

HtmlButtondisposable

System.Web.UI.HtmlControls (system.web.dll)class

This class represents the HTML 4.0 <button> tag, which is only supported in Internet Explorer 4.0 and later. It differs from other button types, including the standard HtmlInputButton control, because it can be composed from embedded HTML elements like images and other ASP.NET server controls. As with all buttons, it provides a click event that you can handle directly (HtmlInputButton.ServerClick) and a property that lets you disable automatic page validation when a postback is triggered by this control (HtmlInputButton.CausesValidation).

public class 

HtmlButton : HtmlContainerControl, System.Web.UI.IPostBackEventHandler { // Public Constructors public

HtmlButton ( ); // Public Instance Properties public bool

CausesValidation {set; get; } // Protected Instance Methods protected override void

OnPreRender (EventArgs

e ); // overrides System.Web.UI.Control protected virtual void

OnServerClick (EventArgs

e ); protected override void

RenderAttributes (System.Web.UI.HtmlTextWriter

writer ); // overrides HtmlContainerControl // Events public event EventHandler

ServerClick ; }

Hierarchy

System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) HtmlControl(System.Web.UI.IAttributeAccessor) HtmlContainerControl HtmlButton(System.Web.UI.IPostBackEventHandler)