HtmlHelper.GenerateIdFromName Method

Definition

Overloads

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.

GenerateIdFromName(String)

Creates an HTML element ID using the specified element name.

public static string GenerateIdFromName (string name);
static member GenerateIdFromName : string -> string
Public Shared Function GenerateIdFromName (name As String) As String

Parameters

name
String

The name of the HTML element.

Returns

The ID of the HTML element.

Exceptions

The name parameter is null.

Applies to

GenerateIdFromName(String, String)

Creates an HTML element ID using the specified element name and a string that replaces dots in the name.

public static string GenerateIdFromName (string name, string idAttributeDotReplacement);
static member GenerateIdFromName : string * string -> string
Public Shared Function GenerateIdFromName (name As String, idAttributeDotReplacement As String) As String

Parameters

name
String

The name of the HTML element.

idAttributeDotReplacement
String

The string that replaces dots (.) in the name parameter.

Returns

The ID of the HTML element.

Exceptions

The name parameter or the idAttributeDotReplacement parameter is null.

Applies to