SetAttributeValue Method

Html Agility Pack

Collapse imageExpand ImageCopy imageCopyHover image
Helper method to set the value of an attribute of this node. If the attribute is not found, it will be created automatically.

Namespace: HtmlAgilityPack
Assembly: HtmlAgilityPack (in HtmlAgilityPack.dll) Version: 1.4.0.0 (1.4.0.0)

Syntax

C#
public HtmlAttribute SetAttributeValue(
	string name,
	string value
)
Visual Basic
Public Function SetAttributeValue ( _
	name As String, _
	value As String _
) As HtmlAttribute
Visual C++
public:
HtmlAttribute^ SetAttributeValue(
	String^ name, 
	String^ value
)

Parameters

name
Type: System..::..String
The name of the attribute to set. May not be null.
value
Type: System..::..String
The value for the attribute.

Return Value

The corresponding attribute instance.

See Also