ZennoLab Assemblies Documentation
SetAttribute Method
Example 
ZennoLab.CommandCenter Namespace > HtmlElement Class : SetAttribute Method

Type: System.String

The attribute name.

Type: System.String

The new value for this attribute.

Sets the text of attribute.
Syntax
public void SetAttribute( 
   string attrName,
   string attrValue
)

Parameters

attrName

Type: System.String

The attribute name.

attrValue

Type: System.String

The new value for this attribute.

Example
The following code example demonstrates uses of the SetAttribute method.
// find element
HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
 
// set attribute
he.SetAttribute("Name", "NewTextValue");
// find element
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
 
// set attribute
$he->SetAttribute("Name", "NewTextValue");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

HtmlElement Class
HtmlElement Members
RiseEvent Method
SetSelectedItems Method
SetValue Method