MvcViewOptions 類別

定義

提供 MVC 架構中檢視的程式設計設定。

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)
繼承
MvcViewOptions
實作

建構函式

MvcViewOptions()

提供 MVC 架構中檢視的程式設計設定。

屬性

AllowRenderingMaxLengthAttribute

取得或設定值,這個值表示當 maxlength 屬性系結至以 StringLengthAttributeMaxLengthAttribute 屬性標示的模型時,是否應該針對相容的 HTML 元素轉譯 maxlength 屬性。

ClientModelValidatorProviders

取得實例的清單 IClientModelValidatorProvider

HtmlHelperOptions

取得或設定 HTML 協助程式和 ViewContext 的程式設計設定。

SuppressTempDataAttributePrefix

取得或設定值,這個值會 ITempDataDictionary 判斷是否已 TempDataAttribute 加上 前置詞標注之屬性的 TempDataProperty- 索引鍵。

未指定 時 Key ,以 標注 TempDataAttribute 的屬性查閱索引鍵衍生自屬性名稱。 在 ASP.NET Core 2.1 之前的版本中,匯出索引鍵是值 前面加上 TempDataProperty- 的屬性名稱。 例如 TempDataProperty-SuccessMessage。 當此選項為 true 時,屬性的匯出索引鍵就是屬性名稱,例如 SuccessMessage

預設值為 false

ViewEngines

取得此應用程式所使用的清單 IViewEngine

明確介面實作

IEnumerable.GetEnumerator()

提供 MVC 架構中檢視的程式設計設定。

IEnumerable<ICompatibilitySwitch>.GetEnumerator()

提供 MVC 架構中檢視的程式設計設定。

適用於