WebBrowser MethodsC# API
The WebBrowser type exposes the following members.
Methods

  NameDescription
Public methodAddDefaultKeepSubRequestContentType
Adds a Content-Type fragment, so the content of sub-request responses that match the specified Content-Type fragment will be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodAddDefaultKeepSubRequestContentUrl
Adds a URL, so the content of sub-request responses that match the specified URL fragment will be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodAddResponseToCache
Adds an entry to this WebBrowser object's cache.
Public methodCacheContentTypeDirectory(String)
Adds a Content-Type media type for which cached content is stored.
Public methodCacheContentTypeDirectory(String, Boolean)
Adds or removes a Content-Type media type for which cached content is stored.
Public methodClearCache
Clears the HTTP cache.
Public methodClearCookies
Clears the cookie cache.
Public methodClearDefaultHeaders
Removes all of the default HTTP headers.
Public methodCloseAllConnections
Closes all of the open TCP/IP connections to the web server.
Public methodContainsDefaultHeader
Determines whether the specified HTTP header is set by default on Request objects created by this WebBrowser.
Public methodCreateRequest(HttpMethod, Url)
Creates a Request object that can be used to send an HTTP request to the web server.
Public methodCreateRequest(HttpMethod, Url, Int32)
Creates a Request object that can be used to send an HTTP request to the web server, specifying a unique identifier that can be used to track the request.
Public methodCreateWebSocket
Creates a WebSocket object that can be used to send/receive WebSocket messages to/from the web server.
Public methodCreateWebSocketMessage(String)
Creates a WebSocketMessage object that can be sent to the server.
Public methodCreateWebSocketMessage( Byte , Boolean)
Creates a WebSocketMessage object that can be sent to the server.
Public methodDispose
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExcludeContentTypeFromCache
Adds a Content-Type for which cached content is not stored.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCachedContentTypeDirectories
Gets a list of all Content-Type media types for which cached content is stored.
Public methodGetCachedContentTypeExclusions
Gets a list of all Content-Types for which cached content is not stored.
Public methodGetConnectionType
Gets the ConnectionType in use.
Public methodGetCookieValue
Gets the value of the specified cookie, at the specified domain and path.
Public methodStatic membergetCPtr
For internal use only. Of no interest to the user.
Public methodGetDefaultContentTypeFragments
Gets a list of all the Content-Type fragments for which the content of sub-request responses will be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodGetDefaultContentUrlFragments
Gets a list of all the URL fragments for which the content of sub-request responses will be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodGetDefaultHeaderKeys
Gets a list of names of all the default HTTP request headers that will be set for every subsequent Request object created by this WebBrowser.
Public methodGetDefaultHeaderValue
Gets the value of the specified default HTTP header.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetProxy
Gets the address of the proxy server used by this WebBrowser.
Public methodGetProxyPort
Gets the port number used by the proxy server for this WebBrowser.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIgnoreHost
Prevents requests from being sent to the specified domain.
Public methodIgnoreHostRegexp
Prevents requests from being sent to any domain that matches the specified regular expression.
Public methodIncludeContentTypeInCache
Adds a Content-Type for which cached content is stored.
Public methodIncludeHost
Allows requests to be sent to the specified domain.
Public methodIncludeHostRegexp
Allow requests to be sent to any host that matches the given regular expression.
Public methodIsHostIgnored
Determines whether the specified domain is currently being ignored.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveCookie
Removes all cookies with the given name from the cookie cache
Public methodRemoveDefaultHeader
Removes the specified default HTTP header.
Public methodRemoveDefaultKeepSubRequestContentType
Removes a Content-Type fragment, so the content of sub-request responses that match the specified Content-Type fragment will no longer be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodRemoveDefaultKeepSubRequestContentUrl
Removes a URL, so the content of sub-request responses that match the specified URL fragment will no longer be kept by default for any subsequent Request objects created by this WebBrowser.
Public methodResumeLogging
Resumes detailed HTTP logging for this Virtual User.
Public methodSaveCookie
Saves cookie data for the specified host.
Public methodSetAccess
Sets the dwAccessType, lpszProxyName and lpszProxyBypass parameters to be passed to InternetOpen() used by WinInet/WinHTTP.
Public methodSetAuthentication
Sets the domain, username and password that will be used for HTTP authentication.
Public methodSetDefaultHeader(String)
Sets a default HTTP request header for every subsequent Request object created by this WebBrowser, using the contents of the specified string.
Public methodSetDefaultHeader(String, String)
Sets a default HTTP request header for every subsequent Request object created by this WebBrowser, as a name/value pair.
Public methodSetProxy
Sets the proxy server address and port.
Public methodSetProxyUserPassword
Sets the username and password that will be used for proxy authentication.
Public methodSetUserPassword
Sets the username and password that will be used for HTTP authentication.
Public methodSuspendLogging
Suspends detailed HTTP logging for this Virtual User.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnignoreHost
Stops preventing requests from being sent to the specified domain.
Public methodUnignoreHostRegexp
Stops preventing requests from being sent to the domains that match the specified regular expression.
Public methodUnincludeHost
Stop sending requests to the specified domain.
Public methodUnincludeHostRegexp
Stop sending requests to hosts that match the given regular expression.
Public methodUnsetProxy
Unsets the proxy server address and port.
Back to Top
See Also