Compartilhar via


DefaultHtmlGenerator.AddMaxLengthAttribute Método

Definição

Adiciona um maxlength atributo ao tagBuilder.

protected:
 virtual void AddMaxLengthAttribute(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData, Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ tagBuilder, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression);
protected virtual void AddMaxLengthAttribute (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression);
abstract member AddMaxLengthAttribute : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
override this.AddMaxLengthAttribute : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
Protected Overridable Sub AddMaxLengthAttribute (viewData As ViewDataDictionary, tagBuilder As TagBuilder, modelExplorer As ModelExplorer, expression As String)

Parâmetros

viewData
ViewDataDictionary

Uma ViewDataDictionary instância para o escopo atual.

tagBuilder
TagBuilder

Uma instância de TagBuilder.

modelExplorer
ModelExplorer

O ModelExplorer para o expression.

expression
String

Nome da expressão, em relação ao modelo atual.

Aplica-se a