asp.net.ph

CssStyleCollection Class

System.Web.UI Namespace


Contains the HTML cascading-style sheets ( CSS ) inline style attributes for a specified HTML server control. This class cannot be inherited.

CssStyleCollection Class Members

Collapse   Properties

Visibility Name Value Type Accessibility
public Count Int32 [ Get ]
public Item ( String key ) String [ Get , Set ]
public Item ( HtmlTextWriterStyle key ) String [ Get , Set ]
public Keys ICollection [ Get ]
public Value String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
public Add ( HtmlTextWriterStyle key , String value ) Void
public Add ( String key , String value ) Void
public Clear ( ) Void
public Remove ( String key ) Void
public Remove ( HtmlTextWriterStyle key ) Void

Remarks

Any style declared for a particular HTML server control is added to the collection when the containing Web Forms page is parsed. It automatically parses and exposes CSS properties through a dictionary pattern API. You can manipulate any CSS property on a server control through the Style property. Simply use the CSS property's key and value in the indexed collection.

Example

The following example demonstrates iterating through an HTML server control's CSSStyleCollection object and rendering all the keys and their values to a Web Forms page.

See Also

ASP.NET Server Controls and CSS Styles   Style 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