Export (0) Print
Expand All

AttributeCollection.AttributeCollection Constructor

Initializes a new instance of the AttributeCollection class.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public AttributeCollection (
	StateBag bag
)
public AttributeCollection (
	StateBag bag
)
public function AttributeCollection (
	bag : StateBag
)
Not applicable.

Parameters

bag

An object that contains the attribute keys and their values from the opening tag of the server control.

The following example shows how to use the AttributeCollection constructor to create an instance of the class named it myAttributeCollection. The code passes the control's ViewState property as a parameter argument.

myAttributeCollection = new AttributeCollection(ViewState);

  myAttributeCollection = 
new System.Web.UI.AttributeCollection(get_ViewState());

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft