Bing.SearchBox Method
Displays a search box and displays results in a new browser window.
Namespace: Microsoft.Web.Helpers
Assembly: Microsoft.Web.Helpers (in Microsoft.Web.Helpers.dll)
Syntax
'Declaration
Public Shared Function SearchBox ( _
boxWidth As String _
) As IHtmlString
'Usage
Dim boxWidth As String
Dim returnValue As IHtmlString
returnValue = Bing.SearchBox(boxWidth)
public static IHtmlString SearchBox(
string boxWidth
)
public:
static IHtmlString^ SearchBox(
String^ boxWidth
)
public static function SearchBox(
boxWidth : String
) : IHtmlString
Parameters
- boxWidth
Type: System.String
(Optional) The width of the search box. The default value is 322 pixels.
Return Value
Type: IHtmlString
An HTML snippet that contains the search results.
Remarks
The SearchBox method renders a search box that includes the Bing search icon that users can click in order to launch the search in a separate browser window.
Examples
The following example shows how to use the SearchBox method to provide search capabilities.
Permissions
- Medium trust for the immediate caller. This member can be used by partially trusted code.