Share via


TagBuilder.GenerateId Method

Generates the id attribute for the tag by using the specified name.

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

Syntax

'Declaration
Public Sub GenerateId ( _
    name As String _
)
public void GenerateId(
    string name
)
public:
void GenerateId(
    String^ name
)

Parameters

  • name
    Type: System.String
    The name to use to generate the id value.

Remarks

This method replaces periods in the id with the character that is designated by the IdAttributeDotReplacement property. By default, periods are replaced with underscores (_).

See Also

Reference

TagBuilder Class

System.Web.Mvc Namespace