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
- key
Type: System.String
The key.
- value
Type: System.String
The value.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The key parameter is null reference (Nothing in Visual Basic) or empty. |