DefaultHtmlGenerator.AddMaxLengthAttribute 方法

定义

maxlength属性添加到 。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)

参数

viewData
ViewDataDictionary

ViewDataDictionary当前范围的 实例。

tagBuilder
TagBuilder

一个 TagBuilder 实例。

modelExplorer
ModelExplorer

ModelExplorerexpression

expression
String

相对于当前模型的表达式名称。

适用于