ZennoLab Assemblies Documentation
SetAttribute Method
Example 

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: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

Reference

HtmlElement Class
HtmlElement Members
RiseEvent Method
SetSelectedItems Method
SetValue Method

Send Feedback