다음을 통해 공유


QueryResultBase.GenerateMenuButtonHtmlForItem Method

The GenerateMenuButtonHtmlForItem method of the QueryResultBase class generates HTML for the menu button.

Namespace:  Microsoft.SharePoint.Portal.WebControls
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Protected Overridable Function GenerateMenuButtonHtmlForItem ( _
    objectDataRow As DataRow, _
    iRow As Integer, _
    strHtmlInECB As String _
) As String
'Usage
Dim objectDataRow As DataRow
Dim iRow As Integer
Dim strHtmlInECB As String
Dim returnValue As String

returnValue = Me.GenerateMenuButtonHtmlForItem(objectDataRow, _
    iRow, strHtmlInECB)
protected virtual string GenerateMenuButtonHtmlForItem(
    DataRow objectDataRow,
    int iRow,
    string strHtmlInECB
)

Parameters

  • iRow
    Type: System.Int32

    Index of the DataRow in the DataSet.

  • strHtmlInECB
    Type: System.String

    HTML to be displayed in the menu button. This HTML is displayed for the menu button regardless of whether the mouse is hovered over the button.

Return Value

Type: System.String
String that contains the HTML string to render the button.

Remarks

The GenerateMenuButtonHtmlForItem method returns a menu button definition. Use HtmlMenuButton to generate the HTML.

Examples

The following example shows how to use this method to generate a menu button definition.

[C#]

HtmlMenuButton btn = new HtmlMenuButton();
btn.MenuID = UniqueID;
btn.ID = "MY_ECB" + iRow.ToString();
btn.DisplayHtml = strHtmlInECB;
btn.Parameters.Add("parameter1", "value1");
return btn.RenderAsHtml();

See Also

Reference

QueryResultBase Class

QueryResultBase Members

Microsoft.SharePoint.Portal.WebControls Namespace