Dela via


MvcViewOptions Class

Definition

Provides programmatic configuration for views in the MVC framework.

public ref class MvcViewOptions
public ref class MvcViewOptions : System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Mvc::Infrastructure::ICompatibilitySwitch ^>
public class MvcViewOptions
public class MvcViewOptions : System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch>
type MvcViewOptions = class
type MvcViewOptions = class
    interface seq<ICompatibilitySwitch>
    interface IEnumerable
Public Class MvcViewOptions
Public Class MvcViewOptions
Implements IEnumerable(Of ICompatibilitySwitch)
Inheritance
MvcViewOptions
Implements

Constructors

MvcViewOptions()

Properties

AllowRenderingMaxLengthAttribute

Gets or sets a value that indicates whether the maxlength attribute should be rendered for compatible HTML elements, when they're bound to models marked with either StringLengthAttribute or MaxLengthAttribute attributes.

ClientModelValidatorProviders

Gets a list of IClientModelValidatorProvider instances.

HtmlHelperOptions

Gets or sets programmatic configuration for the HTML helpers and ViewContext.

SuppressTempDataAttributePrefix

Gets or sets a value that determines if the ITempDataDictionary keys for properties annotated with TempDataAttribute include the prefix TempDataProperty-.

When Key is not specified, the lookup key for properties annotated with TempDataAttribute is derived from the property name. In releases prior to ASP.NET Core 2.1, the calculated key was the property name prefixed by the value TempDataProperty-. e.g. TempDataProperty-SuccessMessage. When this option is true, the calculated key for the property is the property name e.g. SuccessMessage.

Defaults to false.

ViewEngines

Gets a list IViewEngines used by this application.

Explicit Interface Implementations

IEnumerable.GetEnumerator()
IEnumerable<ICompatibilitySwitch>.GetEnumerator()

Applies to