TagBuilder.MergeAttribute TagBuilder.MergeAttribute TagBuilder.MergeAttribute Method

Definition

Overloads

MergeAttribute(String, String) MergeAttribute(String, String) MergeAttribute(String, String)

Adds a new attribute to the tag.

MergeAttribute(String, String, Boolean) MergeAttribute(String, String, Boolean) MergeAttribute(String, String, Boolean)

Adds a new attribute or optionally replaces an existing attribute in the opening tag.

MergeAttribute(String, String) MergeAttribute(String, String) MergeAttribute(String, String)

Adds a new attribute to the tag.

public void MergeAttribute (string key, string value);
member this.MergeAttribute : string * string -> unit
Public Sub MergeAttribute (key As String, value As String)
Parameters
key
String String String

The key for the attribute.

value
String String String

The value of the attribute.

MergeAttribute(String, String, Boolean) MergeAttribute(String, String, Boolean) MergeAttribute(String, String, Boolean)

Adds a new attribute or optionally replaces an existing attribute in the opening tag.

public void MergeAttribute (string key, string value, bool replaceExisting);
member this.MergeAttribute : string * string * bool -> unit
Public Sub MergeAttribute (key As String, value As String, replaceExisting As Boolean)
Parameters
key
String String String

The key for the attribute.

value
String String String

The value of the attribute.

replaceExisting
Boolean Boolean Boolean

true to replace an existing attribute if an attribute exists that has the specified key value, or false to leave the original attribute unchanged.

Applies to