Share via


TagBuilder.MergeAttribute Method (String, String)

Adds an attribute to the tag by using the specified key/value pair.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Sub MergeAttribute ( _
    key As String, _
    value As String _
)
public void MergeAttribute(
    string key,
    string value
)
public:
void MergeAttribute(
    String^ key, 
    String^ value
)

Parameters

Exceptions

Exception Condition
ArgumentException

The key parameter is null reference (Nothing in Visual Basic) or empty.

See Also

Reference

TagBuilder Class

MergeAttribute Overload

System.Web.Mvc Namespace