IWebBrowser2::Navigate2IWebBrowser2::Navigate2*
*Contents  *Index  *Topic Contents
*Previous Topic: IWebBrowser2::Navigate
*Next Topic: IWebBrowser2::PutProperty

IWebBrowser2::Navigate2

HRESULT Navigate2(
    [in] VARIANT * URL,
    [in, optional] VARIANT * Flags,
    [in, optional] VARIANT * TargetFrameName,
    [in, optional] VARIANT * PostData,
    [in, optional] VARIANT * Headers,
);

Navigates the browser to a location that may not be able to be expressed as a URL, such as a pointer to an item identifier list (PIDL) for an entity in the Windows shell namespace.

URL
A caller-allocated string that contains the URL to navigate to or the full path of the file to display.
Flags
Address of a variable that specifies whether to add the resource to the history list, whether to read to or write from the cache, and whether to display the resource in a new window. The variable can be a combination of the values defined by the BrowserNavConstants enumeration.
TargetFrameName
Address of a string that contains the name of the frame in which to display the resource.
PostData
Address of data to send with the HTTP POST transaction. For example, the POST transaction is used to send data gathered by an HTML form. If this parameter does not specify any post data, the Navigate2 method issues an HTTP GET transaction. This parameter is ignored if URL is not an HTTP URL.
Headers
Address of a value that specifies the HTTP headers to send to the server. These headers are added to the default Internet Explorer headers. The headers can specify things like the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if URL is not an HTTP URL.

This method extends the Navigate method to allow for shell integration; however, the original Navigate method can still be used for URL navigations (Navigate2 does not make Navigate obsolete).

The post data specified by PostData is passed as a SAFEARRAY structure. The variant should be of type VT_ARRAY and point to a SAFEARRAY. The SAFEARRAY should be of element type VT_UI1, dimension one, and have an element count equal to the number of bytes of post data.

Applies To

WebBrowser, Internet Explorer

See also DWebBrowserEvents2::BeforeNavigate2, DWebBrowserEvents2::NavigateComplete2


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.