ImageGear .NET v25.0 - Updated
openPage Method

ImageGear.Web.UI Library > ImageGear.Web.UI Namespace > PageView class : openPage Method
Open a new image.
Syntax
ASP.NET Ajax Javascript (Specification) 
function openPage( 
   parameters : PageViewState
) : (Any);
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfPageView.openPage(PageViewState);

Parameters

parameters
An object whose properties are accepted as parameters of this function. Optionally, you may use a JavaScript object literal instead of constructing a new object.
Remarks

This function causes the viewer to begin the process of opening a new image. That process will involve communicating with the server, raising various events, selecting a scaling value with which to display the image, and then updating the presentation of the viewer. During execution of this function, the viewer will raise the pageOpening event, then begin communicating with the server. In a few cases, the conversation with the server will complete before this function returns, but usually, it will not. Once the conversation with the server is complete, the viewer will update the various image properties (such as pageIsOpen, documentIdentifier, pageWidth, etc.) and then raise the pageOpened event.

After this function returns, but before the communication with the server is complete, you can continue to interact with the previous image opened in the viewer. You must be careful in this case because the viewer will immediately discard the current image when the new image finishes opening.

If you call this function once, but call it again before the open process completes (and raises the pageOpened event), the control will cancel the earlier open process. The same is true if you call this function, then call closePage before the open process completes.

If you call this function and provide an empty string as the image identifier, this function will close the image instead of opening it (and it will raise the pageClosed event instead of pageOpening and pageOpened).

NOTE: This function will not detect some error conditions (such as invalid values for documentIdentifier or pageNumber) until the server responds. It will throw an exception at that time, but the only way to detect the exception is via the control's debug log facility. See the debug property for more information.

See Also

Reference

PageView class
PageView Members