HttpRequest.ContentType Property

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

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

property String^ ContentType {
	String^ get ();
	void set (String^ value);
/** @property */
public String get_ContentType ()

/** @property */
public void set_ContentType (String value)

public function get ContentType () : String

public function set ContentType (value : String)

Property Value

A string representing the MIME content type of the incoming request, for example, "text/html".

The following code example assigns the value representing the content type of the incoming request to a string variable.

No code example is currently available or this language may not be supported.
String str;
str = get_Request().get_ContentType();

var str : String = Request.ContentType

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions