Language

WebPartManagerInternals.GetZoneID(WebPart) メソッド

定義

指定した WebPart またはサーバー コントロールを含むゾーンの ID を取得します。

public:
 System::String ^ GetZoneID(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
public string GetZoneID(System.Web.UI.WebControls.WebParts.WebPart webPart);
member this.GetZoneID : System.Web.UI.WebControls.WebParts.WebPart -> string
Public Function GetZoneID (webPart As WebPart) As String

パラメーター

webPart
WebPart

ゾーン内に存在する WebPart 。

返品

webPartを含むゾーンの ID を表す文字列。

注釈

GetZoneID メソッドは、webPart パラメーターによって参照されるコントロールを含むゾーンの ID を返します。

Note

ZoneのwebPart プロパティは、ゾーンの ID ではなく、webPartを含む実際のゾーン オブジェクトを参照します。 webPartが現在閉じている場合、そのZoneプロパティの値はnullされ、GetZoneID メソッドは、閉じる前にwebPartした最後のゾーンの ID を返します。

適用対象

こちらもご覧ください