TagBuilder.GenerateId(String, String) Method

Definition

Adds a valid HTML 4.01 "id" attribute for an element with the given name. Does nothing if Attributes already contains an "id" attribute or the name is null or empty.

public:
 void GenerateId(System::String ^ name, System::String ^ invalidCharReplacement);
public void GenerateId (string name, string invalidCharReplacement);
member this.GenerateId : string * string -> unit
Public Sub GenerateId (name As String, invalidCharReplacement As String)

Parameters

name
String

The fully-qualified expression name, ignoring the current model. Also the original HTML element name.

invalidCharReplacement
String

The String (normally a single Char) to substitute for invalid characters in name.

Applies to

See also