WebPartManager.CreateDynamicWebPartID Method

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

Generates a unique ID for a dynamic WebPart control.

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

protected:
virtual String^ CreateDynamicWebPartID (
	Type^ webPartType
)
protected String CreateDynamicWebPartID (
	Type webPartType
)
protected function CreateDynamicWebPartID (
	webPartType : Type
) : String

Parameters

webPartType

The Type of the control for which an ID is being generated.

Return Value

A string that contains the unique ID for a control.

When WebPart controls are added to a Web page, they can be static (which means the control is declared in the page markup) or dynamic (which means they are added programmatically). In any scenario where the WebPartManager control is creating new dynamic controls to add to the page, it calls this method to generate a unique ID.

The method is virtual so that developers can override it if they want to provide a custom implementation for generating the ID.

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: