HtmlHelper::GenerateIdFromName Method

 

Creates an HTML element ID using the specified element name.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticGenerateIdFromName(String^)

Creates an HTML element ID using the specified element name.

System_CAPS_pubmethodSystem_CAPS_staticGenerateIdFromName(String^, String^)

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

Return to top

HtmlHelper::GenerateIdFromName Method (String^)

Creates an HTML element ID using the specified element name.

public:
static String^ GenerateIdFromName(
	String^ name
)

Parameters

name
Type: System::String^

The name of the HTML element.

Return Value

Type: System::String^

The ID of the HTML element.

Exception Condition
ArgumentNullException

The name parameter is null.

Return to top

HtmlHelper::GenerateIdFromName Method (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
)

Parameters

name
Type: System::String^

The name of the HTML element.

idAttributeDotReplacement
Type: System::String^

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

Return Value

Type: System::String^

The ID of the HTML element.

Exception Condition
ArgumentNullException

The name parameter or the idAttributeDotReplacement parameter is null.

Return to top
Show: