Zennolab.CommandCenter
Insert Method
See Also  Example Send Feedback
Zennolab.CommandCenter Namespace > HtmlElementCollection Class : Insert Method
element

Type: Zennolab.CommandCenter.HtmlElement

The document to insert.

index

Type: System.Int32

The zero-based index at which html element should be inserted.

Inserts a html element into the HtmlElementCollection at the specified index.

Syntax

C# 
public void Insert( 
   HtmlElement element,
   int index
)

Parameters

element

Type: Zennolab.CommandCenter.HtmlElement

The document to insert.

index

Type: System.Int32

The zero-based index at which html element should be inserted.

Example

The following code example demonstrates the Insert method, along with various other properties and methods of the HtmlElementCollection.
C#Copy Code
HtmlElementCollection heCol = tab.FindElementsByTags("input:checkbox");        
            
HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByName("rad");
            
if ((heCol.IsVoid) || (heCol.ErrorDetected)) return -1;
            
heCol.Insert(he, 0);
PHPCopy Code
$heCol = $tab->FindElementsByTags("input:checkbox");        
            
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByName("rad");
            
if (($heCol->IsVoid) || ($heCol->ErrorDetected)) return -1;
            
$heCol->Insert($he, 0);

Remarks

If index is equal to Count, item is added to the end of HtmlElementCollection.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.