HtmlHelper.GenerateIdFromName Method
Creates an HTML element ID using the specified element name.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | GenerateIdFromName(String) | Creates an HTML element ID using the specified element name. |
![]() ![]() | GenerateIdFromName(String, String) | Creates an HTML element ID using the specified element name and a string that replaces dots in the name. |
HtmlHelper.GenerateIdFromName Method (String)
Creates an HTML element ID using the specified element name.
Parameters
- name
-
Type:
System.String
The name of the HTML element.
| Exception | Condition |
|---|---|
| ArgumentNullException | The name parameter is null. |
HtmlHelper.GenerateIdFromName Method (String, String)
Creates an HTML element ID using the specified element name and a string that replaces dots in the name.
Parameters
- name
-
Type:
System.String
The name of the HTML element.
- idAttributeDotReplacement
-
Type:
System.String
The string that replaces dots (.) in the name parameter.
| Exception | Condition |
|---|---|
| ArgumentNullException | The name parameter or the idAttributeDotReplacement parameter is null. |
Show:

