MailBee.NET Objects 4.0

Element.GetAttributeByName Method 

Returns the HTML attribute with the specified name.

public TagAttribute GetAttributeByName(
   string attrName
);

Parameters

attrName
The name of HTML attribute. attrName is case-insensitive.

Return Value

A TagAttribute object representing the specified attribute, or a null reference (Nothing in Visual Basic) if the tag definition does not contain the specified attribute.

Remarks

This method returns the first occurrence of the specified attribute. If you need to examine tags which may contain multiple occurrences of the same attribute, use GetAttributesByName method.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException attrName is a null reference (Nothing in Visual Basic).

See Also

Element Class | MailBee.Html Namespace