ContentType Property

HttpRequest.ContentType Property

Gets or sets the MIME content type of the incoming request.

[Visual Basic]
Public Property ContentType As String
public string ContentType {get; set;}
public: __property String* get_ContentType();
public: __property void set_ContentType(String*);
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".


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

String str;
 str = Request.ContentType;

String* str;
 str = Request->ContentType;

var str : String = Request.ContentType


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

© 2015 Microsoft