WebPart.ID property

Gets or sets an identifier for the Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
<BrowsableAttribute(False)> _
<WebPartStorageAttribute(Storage := Storage.Shared)> _
Public Overrides Property ID As String
	Get
	Set
'Usage
Dim instance As WebPart
Dim value As String

value = instance.ID

instance.ID = value

Property value

Type: System.String
A string value that returns the identifier for the Web Part.

The ID property will be written out by ASP.NET as the __WebPartId attribute on the tag for the Web Part.

NoteNote

Do not set this property when a Web Part is contained in a WebPartZone control; the Web Part infrastructure automatically sets this value.

Show: