MenuItemTemplate.ClientOnClickUsingPostBackEvent 属性

设置或检索控件 ID 和回事件的参数。

命名空间:  Microsoft.SharePoint.WebControls
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Property ClientOnClickUsingPostBackEvent As String
    Get
    Set
用法
Dim instance As MenuItemTemplate
Dim value As String

value = instance.ClientOnClickUsingPostBackEvent

instance.ClientOnClickUsingPostBackEvent = value
public string ClientOnClickUsingPostBackEvent { get; set; }

属性值

类型:System.String
代表 ID 和参数,用逗号分隔String

备注

ClientOnClickUsingPostBackEvent属性设置回通过指定的参数导致开机自检 Ecma 脚本的ClientOnClickScript属性。

如果ClientOnClickScript属性设置后ClientOnClickUsingPostBackEvent属性设置,则会将ClientOnClickUsingPostBackEvent重置为空引用(无 在 Visual Basic 中)。

ClientOnClickScript属性可能包含客户端替换的令牌括在百分号 (%) 字符。

如果尚未设置ClientOnClickPostBackConfirmation属性,以确认消息后单击控件,但在回发之前在客户端浏览器中显示指定的消息。

示例

下面的三个示例的功能等效:

<lSharePoint:MenuItemTemplate runat="server" id="DisplayInvoices" 
  Text="Display Invoices" ImageUrl="/images/invoice.gif" 
  ClientOnClickUsingPostBackEvent=
  "InvoiceDetailControl,CustomerId=%CustomerId%" />
MenuItemTemplate displayInvoices = 
  new MenuItemTemplate("Display Invoices", "/images/invoice.gif");
displayInvoices.ClientOnClickUsingPostBackEvent = 
  "InvoiceDetailControl,CustomerId=%CustomerId%");
customerMenu.Add(displayInvoices);
Dim displayInvoices As New MenuItemTemplate("Display Invoices", "/images/invoice.gif")
displayInvoices.ClientOnClickUsingPostBackEvent = "InvoiceDetailControl,CustomerId=%CustomerId%")
customerMenu.Add(displayInvoices)
MenuItemTemplate displayInvoices = 
  new MenuItemTemplate("Display Invoices", "/images/invoice.gif");
displayInvoices.SetClientOnClickUsingPostBackEvent(InvoiceDetailControl, 
  "CustomerId=%CustomerId%");
customerMenu.Add(displayInvoices);
Dim displayInvoices As New MenuItemTemplate("Display Invoices", "/images/invoice.gif")
displayInvoices.SetClientOnClickUsingPostBackEvent(InvoiceDetailControl, "CustomerId=%CustomerId%")
customerMenu.Add(displayInvoices)

另请参阅

引用

MenuItemTemplate 类

MenuItemTemplate 成员

Microsoft.SharePoint.WebControls 命名空间