TagBuilder.GenerateId(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.