HtmlHelper.GenerateIdFromName Method (String, String)

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

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

'Declaration
Public Shared Function GenerateIdFromName ( _
	name As String, _
	idAttributeDotReplacement As String _
) As String
'Usage
Dim name As String 
Dim idAttributeDotReplacement As String 
Dim returnValue As String 

returnValue = HtmlHelper.GenerateIdFromName(name, _
	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.

ExceptionCondition
ArgumentNullException

The name parameter or the idAttributeDotReplacement parameter is Nothing.

Show: