
640
|
Chapter 36: The System.Web.UI Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
One useful way to use the AttributeCollection class is to add a JavaScript event to a control.
For example, TextBox1.Attributes["onblur"] = "javascript:alert('Focus lost!);"; adds a “lost focus” Java-
Script event. This will work for HTML controls and some simple web controls (like
System.Web.UI.WebControls.TextBox), but not for others (like System.Web.UI.WebControls.Calendar).
Returned By
System.Web.UI.HtmlControls.HtmlControl.Attributes, UserControl.Attributes, System.Web.UI.
WebControls.ListItem.Attributes, System.Web.UI.WebControls.WebControl.Attributes
BaseParser
System.Web.UI (system.web.dll)
class
This class is used transparently by the .NET framework. It is the base class used for
parsing, the process by which code in an .aspx file is interpreted and ultimately
rendered as HTML.
Subclasses
TemplateParser
BasePartialCachingControl
System.Web.UI (system.web.dll)
disposable
abstract class
This base class supports fragment caching, which allows portions of an ASP.NET page
to be cached. This class is inherited by the PartialCachingControl and StaticPartialCachingControl
classes.
public sealed class AttributeCollection {
// Public Constructors
public AttributeCollection( StateBag bag);
// Public Instance Properties
public int Count{get; }
public CssStyleCollection ...