Dela via


MvcViewOptions.AllowRenderingMaxLengthAttribute Property

Definition

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.

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

Property Value

Remarks

If both attributes are specified, the one with the smaller value will be used for the rendered maxlength attribute.

Applies to