MvcViewOptions.AllowRenderingMaxLengthAttribute 屬性

定義

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

public:
 property bool AllowRenderingMaxLengthAttribute { bool get(); void set(bool value); };
public bool AllowRenderingMaxLengthAttribute { get; set; }
member this.AllowRenderingMaxLengthAttribute : bool with get, set
Public Property AllowRenderingMaxLengthAttribute As Boolean

屬性值

備註

如果同時指定這兩個屬性,則具有較小值的屬性將會用於轉譯 maxlength 的屬性。

適用於