Page.ContentType 属性

定义

设置与页关联的 HttpResponse 对象的 HTTP MIME 类型。

protected:
 property System::String ^ ContentType {  void set(System::String ^ value); };
public:
 property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };
protected string ContentType { set; }
[System.ComponentModel.Browsable(false)]
public string ContentType { get; set; }
member this.ContentType : string
[<System.ComponentModel.Browsable(false)>]
member this.ContentType : string with get, set
Protected Property ContentType As String
Public Property ContentType As String

属性值

String

与当前页关联的 HTTP MIME 类型。

属性

注解

在大多数情况下,不要在代码中设置此属性。 ContentType使用 .aspx 文件中的 @ Page 指令设置属性。 请求页面时,动态生成的类将设置属性。

适用于

另请参阅