ContentTypeAttribute Class

ContentTypeAttribute Class

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

[AttributeUsage(AttributeTargets.Class)]
public sealed class ContentTypeAttribute: Attribute, IPageModelAttribute

Inheritance  Attribute ContentTypeAttribute

Implements  IPageModelAttribute

Constructors

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

Properties

Name Description
ContentType

Methods

Name Description
Apply(PageDefinition)