New to Telerik UI for ASP.NET Core? Start a free 30-day trial

KendoHtmlGenerator class.

Definition

Namespace:Kendo.Mvc.Rendering

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class KendoHtmlGenerator : IKendoHtmlGenerator

Inheritance: objectKendoHtmlGenerator

Implements: IKendoHtmlGenerator

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the KendoHtmlGenerator class.

C#
public KendoHtmlGenerator(IModelMetadataProvider metadataProvider, IOptions<MvcViewOptions> optionsAccessor)
Parameters:metadataProviderIModelMetadataProvideroptionsAccessorIOptions<MvcViewOptions>

Properties

IdAttributeDotReplacement member.

C#
public string IdAttributeDotReplacement { get; }

Methods

Adds a maxlength attribute to the tagBuilder.

C#
protected virtual void AddMaxLengthAttribute(ViewDataDictionary viewData, TagBuilder tagBuilder, ModelExplorer modelExplorer, string expression)
Parameters:viewDataViewDataDictionary

A ViewDataDictionary instance for the current scope.

tagBuilderTagBuilder

A TagBuilder instance.

modelExplorerModelExplorer

The ModelExplorer for the expression.

expressionstring

Expression name, relative to the current model.

Adds a placeholder attribute to the tagBuilder.

C#
protected virtual void AddPlaceholderAttribute(ViewDataDictionary viewData, TagBuilder tagBuilder, ModelExplorer modelExplorer, string expression)
Parameters:viewDataViewDataDictionary

A ViewDataDictionary instance for the current scope.

tagBuilderTagBuilder

A TagBuilder instance.

modelExplorerModelExplorer

The ModelExplorer for the expression.

expressionstring

Expression name, relative to the current model.

Adds a readonly attribute to the tagBuilder.

C#
protected virtual void AddReadonlyAttribute(ViewDataDictionary viewData, TagBuilder tagBuilder, ModelExplorer modelExplorer, string expression)
Parameters:viewDataViewDataDictionary

A ViewDataDictionary instance for the current scope.

tagBuilderTagBuilder

A TagBuilder instance.

modelExplorerModelExplorer

The ModelExplorer for the expression.

expressionstring

Expression name, relative to the current model.

Adds validation attributes to the tagBuilder if client validation is enabled.

C#
protected virtual void AddValidationAttributes(ViewContext viewContext, TagBuilder tagBuilder, ModelExplorer modelExplorer, string expression)
Parameters:viewContextViewContext

A ViewContext instance for the current scope.

tagBuilderTagBuilder

A TagBuilder instance.

modelExplorerModelExplorer

The ModelExplorer for the expression.

expressionstring

Expression name, relative to the current model.

GenerateBoundElement method.

C#
public TagBuilder GenerateBoundElement(string elementType, ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, string type, IDictionary<string, object> htmlAttributes)
Parameters:elementTypestringviewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringtypestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateBoundElement(string, ViewContext, ModelExplorer, string, string, object, string, string, IDictionary<string, object>)

GenerateColorInput method.

C#
public virtual TagBuilder GenerateColorInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjecthtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateColorInput(ViewContext, ModelExplorer, string, string, object, IDictionary<string, object>)

GenerateDateInput method.

C#
public virtual TagBuilder GenerateDateInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateDateInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

GenerateDateTimeInput method.

C#
public virtual TagBuilder GenerateDateTimeInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateDateTimeInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

GenerateHiddenForCheckbox method.

C#
public virtual TagBuilder GenerateHiddenForCheckbox(ViewContext viewContext, string name, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextnamestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateHiddenForCheckbox(ViewContext, string, IDictionary<string, object>)

GenerateInput method.

C#
public TagBuilder GenerateInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, string type, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringtypestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateInput(ViewContext, ModelExplorer, string, string, object, string, string, IDictionary<string, object>)

GenerateMultiSelect method.

C#
public virtual TagBuilder GenerateMultiSelect(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateMultiSelect(ViewContext, ModelExplorer, string, string, IDictionary<string, object>)

GenerateNumericInput method.

C#
public virtual TagBuilder GenerateNumericInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateNumericInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

GeneratePseudoBuilder method.

C#
public TagBuilder GeneratePseudoBuilder(ViewContext viewContext, ModelExplorer modelExplorer, string name)
Parameters:viewContextViewContextmodelExplorerModelExplorernamestringReturns:

TagBuilder

Implements: IKendoHtmlGenerator.GeneratePseudoBuilder(ViewContext, ModelExplorer, string)

GeneratePseudoFileInputBuilder method.

C#
public TagBuilder GeneratePseudoFileInputBuilder(ViewContext viewContext, ModelExplorer modelExplorer, string name)
Parameters:viewContextViewContextmodelExplorerModelExplorernamestringReturns:

TagBuilder

Implements: IKendoHtmlGenerator.GeneratePseudoFileInputBuilder(ViewContext, ModelExplorer, string)

GenerateRadioInput method.

C#
public TagBuilder GenerateRadioInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateRadioInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

GenerateRangeInput method.

C#
public virtual TagBuilder GenerateRangeInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjecthtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateRangeInput(ViewContext, ModelExplorer, string, string, object, IDictionary<string, object>)

GenerateTag method.

C#
public virtual TagBuilder GenerateTag(string tagName, IDictionary<string, object> htmlAttributes)
Parameters:tagNamestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateTag(string, IDictionary<string, object>)

GenerateTag method.

C#
public virtual TagBuilder GenerateTag(string tagName, ViewContext viewContext, string id, string name, IDictionary<string, object> htmlAttributes)
Parameters:tagNamestringviewContextViewContextidstringnamestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateTag(string, ViewContext, string, string, IDictionary<string, object>)

GenerateTextarea method.

C#
public virtual TagBuilder GenerateTextarea(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateTextarea(ViewContext, ModelExplorer, string, string, IDictionary<string, object>)

GenerateTextInput method.

C#
public TagBuilder GenerateTextInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateTextInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

GenerateTimeInput method.

C#
public virtual TagBuilder GenerateTimeInput(ViewContext viewContext, ModelExplorer modelExplorer, string id, string name, object value, string format, IDictionary<string, object> htmlAttributes)
Parameters:viewContextViewContextmodelExplorerModelExploreridstringnamestringvalueobjectformatstringhtmlAttributesIDictionary<string, object>Returns:

TagBuilder

Implements: IKendoHtmlGenerator.GenerateTimeInput(ViewContext, ModelExplorer, string, string, object, string, IDictionary<string, object>)

Gets an <input> element's "type" attribute value based on the given modelExplorer or InputType.

C#
protected string GetInputType(ModelExplorer modelExplorer, out string inputTypeHint)
Parameters:modelExplorerModelExplorer

The ModelExplorer to use.

inputTypeHintstring

When this method returns, contains the string, often the name of a ModelType base class, used to determine this method's return value.

Returns:

string

An <input> element's "type" attribute value.

SanitizeId method.

C#
public string SanitizeId(string id)
Parameters:idstringReturns:

string

The result.

Implements: IKendoHtmlGenerator.SanitizeId(string)