HttpRequest.ContentType プロパティ

受信要求で使用する MIME の Content-Type を取得または設定します。

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)

構文

'宣言
Public Property ContentType As String
'使用
Dim instance As HttpRequest
Dim value As String

value = instance.ContentType

instance.ContentType = value
public string ContentType { get; set; }
public:
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)
適用できません。

プロパティ値

受信要求の MIME コンテンツ タイプを表す文字列 ("text/html" など)。

使用例

受信要求のコンテンツ タイプを表す値を文字列変数に代入するコード例を次に示します。

Dim str As String
 str = Request.ContentType
   
String str;
 str = Request.ContentType;
   
String str;
str = get_Request().get_ContentType();
var str : String = Request.ContentType
   

プラットフォーム

Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

HttpRequest クラス
HttpRequest メンバ
System.Web 名前空間