WebPartCollection.Item Property (String)

Note: This property is new in the .NET Framework version 2.0.

Returns a member of the collection based on a unique string identifier.

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

public:
property WebPart^ default [String^] {
	WebPart^ get (String^ id);
}
/** @property */
public WebPart get_Item (String id)

JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

id

The unique identifier for a particular WebPart control in a collection.

Property Value

The first WebPart in the collection whose ID equals the value of id.

The Item indexer enables you to access a WebPart control in a WebPartCollection object according to a unique identifier.

NoteNote

The Web Parts control set performs case-insensitive matching on this property, so case sensitivity is not part of a unique id value.

The Item property also works to identify members of a WebPartCollection object in some specialized cases. In the case of GenericWebPart controls, the indexer is able to match the identifier for the underlying child control wrapped by the GenericWebPart control. In the case of ProxyWebPart controls, the indexer matches the identifier for the control based on a case-insensitive comparison of the id parameter and either the OriginalID or GenericWebPartID property values.

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: