HttpResponse.ContentType プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As HttpResponse Dim value As String value = instance.ContentType instance.ContentType = value
/** @property */ public String get_ContentType () /** @property */ public void set_ContentType (String value)
出力ストリームの HTTP MIME タイプ。既定値は "text/html" です。

例外の種類 | 条件 |
---|---|
HttpException | ContentType プロパティが null 参照 (Visual Basic では Nothing) に設定されています。 |

次のコード例では、応答の ContentType プロパティを image/jpeg に設定します。次に、Clear メソッドを呼び出して、すべてのヘッダーと応答に添付される可能性があるその他のコンテンツを削除します。続いて、BufferOutput プロパティを true に設定して、要求元クライアントにコンテンツが送信される前にページ全体の処理が完了するようにします。

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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHttpResponse.ContentType プロパティを検索する場合は、下記のリンクをクリックしてください。

- HttpResponse.ContentType プロパティのページへのリンク