Specifies the default Content-Type HTTP header value for the response of the page.

[AttributeUsageAttribute(AttributeTargets.Class)]
public sealed class MediaTypeAttribute: IContentTypeAttribute
Inheritance:
ObjectAttributeMediaTypeAttribute
Implements:
IContentTypeAttribute

Constructors

MediaTypeAttribute(string) Specifies the Content-Type HTTP header value for the response of the content. If this attribute is omitted, "text/html" is set as the content type by default.

Properties

MediaType

Methods

Apply(ContentTypeDefinition)