DefaultHtmlGenerator.AddMaxLengthAttribute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a maxlength
attribute to the 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)
Parameters
- viewData
- ViewDataDictionary
A ViewDataDictionary instance for the current scope.
- tagBuilder
- TagBuilder
A TagBuilder instance.
- modelExplorer
- ModelExplorer
The ModelExplorer for the expression
.
- expression
- String
Expression name, relative to the current model.