ImageGear .NET v24.12 - Updated
insertPage Method

ImageGear.Web.UI Library > ImageGear.Web.UI Namespace > ImGearPageCollection class : insertPage Method
Inserts a page at the location in the collection specified by the parameter 'index'.
Syntax
ASP.NET Ajax Javascript (Specification) 
function insertPage( 
   index : number(Integer),
   page : ImGearPage
) : (Any);
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfImGearPageCollection.insertPage(number(Integer),ImGearPage);

Parameters

index
The zero-based index in the page collection where the page is to be inserted.
page
The page to be inserted in the collection.
Remarks

The function will insert the page in the parameter at the location in the collection specified by the index parameter.

The index will be validated. The value must be in the range zero or greater than zero, but less than or equal to the collection length (0 <= index <= current length). An exception is thrown for invalid values. If the collection is empty and insertion index specified is other than 0, an exception will be thrown. Negative values for the index are not acceptable. The insert action at index zero when the collection is empty is equivalent to addPage action. The insertion occurs at the index specified, for example, insertPage(0,newPage) would insert the new page before the existing index 0.

After this function has inserted the page to the collection, it will raise the pageAdded event.

Note: A page object instance can be added only to one ImGearThumbnailList control at a time and a single page object must be unique within a ImGearThumbnailList control on an entire web page. For details see the remarks section of the addPage property.

See Also

Reference

ImGearPageCollection class
ImGearPageCollection Members