Export (0) Print
Expand All
0 out of 5 rated this helpful - Rate this topic

HttpRequest.ContentType Property

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

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

public string ContentType { get; set; }
/** @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.

String str;
 str = Request.ContentType;
   

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.