TagBuilder.MergeAttribute Method (String, String, Boolean)

Visual Studio 2010

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)

public void MergeAttribute(
	string key,
	string value,
	bool replaceExisting
)

Parameters

key
Type: System.String
The key.
value
Type: System.String
The value.
replaceExisting
Type: System.Boolean
true to replace the existing attribute.

ExceptionCondition
ArgumentException

The key parameter is null or empty.

Community Additions

ADD
Show: