Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpWebRequest.MediaType Property

Gets or sets the media type of the request.

[Visual Basic]
Public Property MediaType As String
[C#]
public string MediaType {get; set;}
[C++]
public: __property String* get_MediaType();
public: __property void set_MediaType(String*);
[JScript]
public function get MediaType() : String;
public function set MediaType(String);

Property Value

The media type of the request. The default value is a null reference (Nothing in Visual Basic).

Remarks

The value of the MediaType property affects the CharacterSet property. When you set the MediaType in the request, the corresponding media type is chosen from the list of character sets returned in the response Content-type HTTP header.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

HttpWebRequest Class | HttpWebRequest Members | System.Net Namespace

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft