ZennoLab Assemblies Documentation
SetAttribute Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > HtmlElement Class : SetAttribute Method
attrName

Type: System.String

The attribute name.

attrValue

Type: System.String

The new value for this attribute.

Glossary Item Box

Sets the text of attribute.

Syntax

C# 
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.
C#Copy Code
// find element
HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("input:checkbox", "fulltag", "input:checkbox", "text", 0);
 
// set attribute
he.SetAttribute("Name", "NewTextValue");
PHPCopy Code
// 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

See Also

© 2014 All Rights Reserved.