WebClient Members
.NET Framework 3.0
Provides common methods for sending data to and receiving data from a resource identified by a URI.
The following tables list the members exposed by the WebClient type.
(see also
Protected Properties
)
Top
| Name | Description | |
|---|---|---|
| BaseAddress | Gets or sets the base URI for requests made by a WebClient. |
| CachePolicy | Gets or sets the application's cache policy for any resources obtained by this WebClient instance using WebRequest objects. |
| Container | Gets the IContainer that contains the Component.(inherited from Component) |
| Credentials | Gets or sets the network credentials that are sent to the host and used to authenticate the request. |
| Encoding | Gets and sets the Encoding used to upload and download strings. |
| Headers | Gets or sets a collection of header name/value pairs associated with the request. |
| IsBusy | Gets whether a Web request is in progress. |
| Proxy | Gets or sets the proxy used by this WebClient object. |
| QueryString | Gets or sets a collection of query name/value pairs associated with the request. |
| ResponseHeaders | Gets a collection of header name/value pairs associated with the response. |
| Site | Gets or sets the ISite of the Component.(inherited from Component) |
| UseDefaultCredentials | Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests. |
| Name | Description | |
|---|---|---|
| CanRaiseEvents | Gets a value indicating whether the component can raise an event.(inherited from Component) |
| DesignMode | Gets a value that indicates whether the Component is currently in design mode.(inherited from Component) |
| Events | Gets the list of event handlers that are attached to this Component.(inherited from Component) |
(see also
Protected Methods
)
Top
| Name | Description | |
|---|---|---|
| CancelAsync | Cancels a pending asynchronous operation. |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject) |
| Dispose | Overloaded. Releases the resources used by the Component. (inherited from Component) |
| DownloadData | Overloaded. Downloads with the specified URI as a Byte array. |
| DownloadDataAsync | Overloaded. Downloads the specified resource as a Byte array. These methods do not block the calling thread. |
| DownloadFile | Overloaded. Downloads the resource with the specified URI to a local file. |
| DownloadFileAsync | Overloaded. Downloads the specified resource to a local file. These methods do not block the calling thread. |
| DownloadString | Overloaded. Downloads the requested resource as a String. The resource to download may be specified as either String containing the URI or a Uri. |
| DownloadStringAsync | Overloaded. Downloads the resource specified as a String or a Uri. These methods do not block the calling thread. |
| Equals | Overloaded. Determines whether two Object instances are equal. (inherited from Object) |
| GetHashCode | Serves as a hash function for a particular type. (inherited from Object) |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject) |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject) |
| OpenRead | Overloaded. Opens a readable stream for the data downloaded from a resource with the specified URI. |
| OpenReadAsync | Overloaded. Opens a readable stream containing the specified resource. These methods do not block the calling thread. |
| OpenWrite | Overloaded. Opens a stream for writing data to a resource with the specified URI. |
| OpenWriteAsync | Overloaded. Opens a stream for writing data to the specified resource. These methods do not block the calling thread. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component) |
| UploadData | Overloaded. Uploads a data buffer to a resource with the specified URI. |
| UploadDataAsync | Overloaded. Uploads a data buffer to a resource identified by a URI. This method does not block the calling thread. |
| UploadFile | Overloaded. Uploads a local file to a resource with the specified URI. |
| UploadFileAsync | Overloaded. Uploads the specified local file to the specified resource. These methods do not block the calling thread. |
| UploadString | Overloaded. Uploads the specified string to the specified resource. |
| UploadStringAsync | Overloaded. Uploads the specified string to the specified resource. These methods do not block the calling thread. |
| UploadValues | Overloaded. Uploads a name/value collection to a resource with the specified URI. |
| UploadValuesAsync | Overloaded. Uploads the specified name/value collection to the resource identified by the specified URI. These methods do not block the calling thread. |
| Name | Description | |
|---|---|---|
| Dispose | Overloaded. Releases the resources used by the Component. (inherited from Component) |
| Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (inherited from Component) |
| GetService | Returns an object that represents a service provided by the Component or by its Container. (inherited from Component) |
| GetWebRequest | Returns a WebRequest object for the specified resource. |
| GetWebResponse | Overloaded. Returns the WebResponse for the specified WebRequest. |
| MemberwiseClone | Overloaded. (inherited from MarshalByRefObject) |
| OnDownloadDataCompleted | Raises the DownloadDataCompleted event. |
| OnDownloadFileCompleted | Raises the DownloadFileCompleted event. |
| OnDownloadProgressChanged | Raises the DownloadProgressChanged event. |
| OnDownloadStringCompleted | Raises the DownloadStringCompleted event. |
| OnOpenReadCompleted | Raises the OpenReadCompleted event. |
| OnOpenWriteCompleted | Raises the OpenWriteCompleted event. |
| OnUploadDataCompleted | Raises the UploadDataCompleted event. |
| OnUploadFileCompleted | Raises the UploadFileCompleted event. |
| OnUploadProgressChanged | Raises the UploadProgressChanged event. |
| OnUploadStringCompleted | Raises the UploadStringCompleted event. |
| OnUploadValuesCompleted | Raises the UploadValuesCompleted event. |
| Name | Description | |
|---|---|---|
| Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component) |
| DownloadDataCompleted | Occurs when an asynchronous data download operation completes. |
| DownloadFileCompleted | Occurs when an asynchronous file download operation completes. |
| DownloadProgressChanged | Occurs when an asynchronous download operation successfully transfers some or all of the data. |
| DownloadStringCompleted | Occurs when an asynchronous resource-download operation completes. |
| OpenReadCompleted | Occurs when an asynchronous operation to open a stream containing a resource completes. |
| OpenWriteCompleted | Occurs when an asynchronous operation to open a stream to write data to a resource completes. |
| UploadDataCompleted | Occurs when an asynchronous data-upload operation completes. |
| UploadFileCompleted | Occurs when an asynchronous file-upload operation completes. |
| UploadProgressChanged | Occurs when an asynchronous upload operation successfully transfers some or all of the data. |
| UploadStringCompleted | Occurs when an asynchronous string-upload operation completes. |
| UploadValuesCompleted | Occurs when an asynchronous upload of a name/value collection completes. |