asp.net.ph

WebControl Class

System.Web.UI.WebControls Namespace


Serves as the base class that defines the methods, properties and events common to all controls in the System.Web.UI.WebControls namespace.

WebControl Class Members

Collapse   Constructors

Visibility Constructor Parameters
public WebControl ( HtmlTextWriterTag tag )

Collapse   Properties

Visibility Name Value Type Accessibility
public AccessKey String [ Get , Set ]
public Attributes AttributeCollection [ Get ]
public BackColor Color [ Get , Set ]
public BorderColor Color [ Get , Set ]
public BorderStyle BorderStyle [ Get , Set ]
public BorderWidth Unit [ Get , Set ]
public ControlStyle Style [ Get ]
public ControlStyleCreated Boolean [ Get ]
public CssClass String [ Get , Set ]
public static DisabledCssClass String [ Get , Set ]
public Enabled Boolean [ Get , Set ]
public EnableTheming Boolean [ Get , Set ]
public Font FontInfo [ Get ]
public ForeColor Color [ Get , Set ]
public HasAttributes Boolean [ Get ]
public Height Unit [ Get , Set ]
public SkinID String [ Get , Set ]
public Style CssStyleCollection [ Get ]
public SupportsDisabledAttribute Boolean [ Get ]
public TabIndex Int16 [ Get , Set ]
public ToolTip String [ Get , Set ]
public Width Unit [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected AddAttributesToRender ( HtmlTextWriter writer ) Void
public ApplyStyle ( Style s ) Void
public CopyBaseAttributes ( WebControl controlSrc ) Void
protected CreateControlStyle ( ) Style
protected LoadViewState ( Object savedState ) Void
public MergeStyle ( Style s ) Void
public RenderBeginTag ( HtmlTextWriter writer ) Void
public RenderEndTag ( HtmlTextWriter writer ) Void
protected SaveViewState ( ) Object
protected TrackViewState ( ) Void

Remarks

The WebControl class provides the properties, methods, and events that are common to all Web server controls.

You can control the appearance and behavior of a Web server control by setting properties defined in this class. For example, the background color and font color of a control can be set using the BackColor and ForeColor properties, respectively. On controls that can display a border, you can set the BorderWidth, the BorderStyle, and the BorderColor properties. The size of a Web server control can be set using the Height and Width properties.

The behavior of the control can be specified by setting certain properties. You can enable and disable a control by setting the Enabled property. The place of the control in the tab order is controlled by setting the TabIndex property. You can specify a ToolTip for the control by setting the ToolTip property.

NOTE: Not all controls support every property defined in this class. See the documentation for the specific control for information on whether a property is supported.

Certain properties of the base control may render differently, depending on the browser. Certain properties may not render on downlevel browsers for some or all controls, while others may render, but have no effect.

The HttpBrowserCapabilities object determines the way in which a Web server control renders. For browsers that support HTML 4.0, most properties will be rendered using HTML 4.0 style attributes. Browsers that are not known to support HTML 4.0 will automatically map the style attributes to any equivalent HTML 3.2 tag attributes.

In some cases, the style attributes will be converted into additional tags, when appropriate. For specific information about how a property is rendered in different browsers, see the documentation for the specific property.

See Also

Control Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph