WebPartChrome.GetWebPartChromeClientID(WebPart) 方法

定义

获取网页中呈现的 WebPartChrome 对象的客户端 ID。Gets the client ID for the WebPartChrome object as rendered in a Web page.

protected:
 System::String ^ GetWebPartChromeClientID(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
protected string GetWebPartChromeClientID (System.Web.UI.WebControls.WebParts.WebPart webPart);
member this.GetWebPartChromeClientID : System.Web.UI.WebControls.WebParts.WebPart -> string
Protected Function GetWebPartChromeClientID (webPart As WebPart) As String

参数

webPart
WebPart

当前正在呈现的控件。The control currently being rendered.

返回

String

一个包含 WebPartChrome 对象的客户端 ID 的字符串。A string that contains the client ID for the WebPartChrome object.

例外

webPartnullwebPart is null.

注解

GetWebPartChromeClientID方法获取包含所呈现的的表的客户端 ID webPartThe GetWebPartChromeClientID method gets the client ID of the table that contains the webPart being rendered. 该表是直接与对象相对应的呈现输出, WebPartChrome 用作应用样式并为控件创建模块化布局的容器。The table is the rendered output that corresponds directly to the WebPartChrome object, and is used as a container to apply styles and create a modular layout for the control.

WebPartChrome如果要在 chrome 中更改对象的客户端 ID,而不需要将页面回发到服务器,则可以获取对象的客户端 ID。It is useful to get the client ID of the WebPartChrome object for client-side scripting purposes, if you want to change something in the chrome without having to post the page back to the server.

适用于

另请参阅