TagBuilder.MergeAttribute Method

Definition

Overloads

MergeAttribute(String, String)

Adds a new attribute to the tag.

MergeAttribute(String, String, Boolean)

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

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

The key for the attribute.

value
String

The value of the attribute.

Applies to

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

The key for the attribute.

value
String

The value of the attribute.

replaceExisting
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