HtmlHelperNameExtensions Class

Summary

Name-related extensions for [Microsoft.AspNet.Mvc.Rendering.IHtmlHelper](Microsoft.AspNet.Mvc.Rendering.IHtmlHelper.yml).

Syntax

public class HtmlHelperNameExtensions

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Rendering.HtmlHelperNameExtensions

Methods

IdForModel(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper)

Returns the HTML element Id for the current model.

Arguments:
Return type:

System.String

Returns:

A [System.String]() containing the element Id.

public static string IdForModel(IHtmlHelper htmlHelper)
NameForModel(Microsoft.AspNet.Mvc.Rendering.IHtmlHelper)

Returns the full HTML element name for the current model.

Arguments:
Return type:

System.String

Returns:

A [System.String]() containing the element name.

public static string NameForModel(IHtmlHelper htmlHelper)