TagBuilder.CreateSanitizedId TagBuilder.CreateSanitizedId TagBuilder.CreateSanitizedId Method

Definition

Overloads

CreateSanitizedId(String) CreateSanitizedId(String) CreateSanitizedId(String)

Replaces each invalid character in the tag ID with a valid HTML character.

CreateSanitizedId(String, String) CreateSanitizedId(String, String) CreateSanitizedId(String, String)

Replaces each invalid character in the tag ID with the specified replacement string.

CreateSanitizedId(String) CreateSanitizedId(String) CreateSanitizedId(String)

Replaces each invalid character in the tag ID with a valid HTML character.

public static string CreateSanitizedId (string originalId);
static member CreateSanitizedId : string -> string
Public Shared Function CreateSanitizedId (originalId As String) As String
Parameters
originalId
String String String

The ID that might contain characters to replace.

Returns

The sanitized tag ID, or null if originalId is null or empty, or if originalId does not begin with a letter.

CreateSanitizedId(String, String) CreateSanitizedId(String, String) CreateSanitizedId(String, String)

Replaces each invalid character in the tag ID with the specified replacement string.

public static string CreateSanitizedId (string originalId, string invalidCharReplacement);
static member CreateSanitizedId : string * string -> string
Public Shared Function CreateSanitizedId (originalId As String, invalidCharReplacement As String) As String
Parameters
originalId
String String String

The ID that might contain characters to replace.

invalidCharReplacement
String String String

The replacement string.

Returns

The sanitized tag ID, or null if originalId is null or empty, or if originalId does not begin with a letter.

Exceptions

Applies to