TagBuilder.CreateSanitizedId(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.
Returns a valid HTML 4.01 "id" attribute value for an element with the given name
.
public:
static System::String ^ CreateSanitizedId(System::String ^ name, System::String ^ invalidCharReplacement);
public static string CreateSanitizedId (string name, string invalidCharReplacement);
public static string CreateSanitizedId (string? name, string invalidCharReplacement);
static member CreateSanitizedId : string * string -> string
Public Shared Function CreateSanitizedId (name As String, invalidCharReplacement As String) 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
.
Returns
Valid HTML 4.01 "id" attribute value for an element with the given name
.
Remarks
Valid "id" attributes are defined in https://www.w3.org/TR/html401/types.html#type-id.