WebPartManagerInternals.SetZoneID(WebPart, String) 方法

定义

设置一个允许 WebPart 或服务器控件保留包含区域的 ID 的属性。Sets a property that enables a WebPart or server control to keep the ID of the containing zone.

public:
 void SetZoneID(System::Web::UI::WebControls::WebParts::WebPart ^ webPart, System::String ^ zoneID);
public void SetZoneID (System.Web.UI.WebControls.WebParts.WebPart webPart, string zoneID);
member this.SetZoneID : System.Web.UI.WebControls.WebParts.WebPart * string -> unit
Public Sub SetZoneID (webPart As WebPart, zoneID As String)

参数

webPart
WebPart

正在设置其 zoneID 属性值的 WebPartThe WebPart whose zoneID property value is being set.

zoneID
String

包含 webPart 所属的区域的 ID 的字符串。A string that contains the ID of the zone that webPart belongs to.

注解

WebPartManager当向区域添加控件时,控件将调用此方法 WebPartThis method is called by the WebPartManager control when a WebPart control is being added to a zone. 每个 WebPart 控件跟踪其所属的区域的 ID,此方法设置保留 ID 值的属性。Each WebPart control tracks the ID for the zone it belongs to, and this method sets the property that keeps the ID value.

适用于

另请参阅