Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
objectDataRow
Type: System.Data.DataRowDataRow that represents the current item.
iRow
Type: System.Int32Index of the DataRow in the DataSet.
strHtmlInECB
Type: System.StringHTML 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();