This documentation is archived and is not being maintained.
HttpRequest.ContentType Property
.NET Framework 1.1
Gets or sets the MIME content type of the incoming request.
[Visual Basic] Public Property ContentType As String [C#] public string ContentType {get; set;} [C++] public: __property String* get_ContentType(); public: __property void set_ContentType(String*); [JScript] public function get ContentType() : String; public function set ContentType(String);
Property Value
A string representing the MIME content type of the incoming request. For example, "text/html".
Example
The following example assigns the value representing the content type of the incoming request to a string variable.
[Visual Basic] Dim str As String str = Request.ContentType [C#] String str; str = Request.ContentType; [C++] String* str; str = Request->ContentType; [JScript] var str : String = Request.ContentType
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpRequest Class | HttpRequest Members | System.Web Namespace
Show: