Developing Web Applications with the Web ADF - Web controls  

PageLayout control

The PageLayout control is designed to display the layout from a map document served through ArcGIS Server. A layout is typically created in a map document for printing or displaying a map and related items. The user may print the layout page displayed in the browser.

A toolbar may be included on the page, and tools added at design time. These tools allow the user to interact with the layout. Standard tools may be added that allow zooming and panning the layout page, as well as zooming and panning the map.

Unlike the Map control, the PageLayout control does not use an associated MapResourceManager. Instead, the resource information is set in the properties of the PageLayout control itself. 

Assembly: ESRI.ArcGIS.ADF.Web.UI.WebControls.dll
Class: ESRI.ArcGIS.ADF.Web.UI.WebControls.PageLayout
Using the PageLayout control
  1. Add the controls to the page

    Open or create a Web site within Visual Studio.NET.   Open a Web form in design mode, select the Toolbox, and expand the ArcGIS Web Controls tab.  Drag and drop a PageLayout control and, optionally, a Toolbar control onto the Web form.  You should see the following in Visual Studio:

    PageLayout control in Visual Studio  

    If you added a Toolbar control, set its BuddyControlType property to PageLayout, and add the PageLayout control you just added to the BuddyControls collection. Then add one or more tools to the toolbar. When the buddy control is a page layout, the tools include tools to zoom and pan on the page, as well as tools to zoom and pan on the map. See the Toolbar control page for details on setting these properties.
  2. Set PageLayout properties

    Select the PageLayout control.  In the Properties page:
    1. Click in the value of the PageLayoutResource property, then click the ellipsis (...) button. This opens the Page Layout Resource Definition Editor. 
    2. In the resource definition editor, set the Type to ArcGIS Server Local. Set the Data Source by clicking the ellipsis (...) button to the right of the property line, or type the name of the ArcGIS Server machine.
      PageLayout properties
    3. Set the Resource used to an available service. Click the ellipsis (...) button to display a dialog where you can select a resource from a drop-down list. Click OK to accept the choices and dismiss the dialog boxes. 

    4. Resize the PageLayout control to an acceptable size. Click to select it on the page, then left-click and hold over a handle on a side or a corner of the control and drag the control to an acceptable size. By default, the position of controls added in Visual Studio 2005 at design time is not set. As a result, the controls are permitted to flow from left to right within a line, and from top to bottom within the page. See the section about control positioning in the Visual Studio Integration topic for more information.
  3. Add an ArcGIS Identity

    Web sites using an ArcGIS Server Local resource must contain an ArcGIS identity to enable use of the resource. To add an identity, right-click on the Web application in the Solution Explorer, and click Add ArcGIS Identity. A dialog displays where you can enter the user name, password, and domain or machine name. Click OK to insert the identity, which is stored in the web.config file of the application.

    The identity must be a member of the agsusers group on the server object manager (SOM) machine. Only one identity is allowed per application, so if your application connects to multiple local servers, make sure that the identity account is in the agsusers group on all of the servers.

    If an appropriate identity is not added to the application, the user will see an error at runtime.



  The following table provides a list of properties and events of interest.  For complete reference information, see the PageLayout control in the library reference section.

Property Name  Type Description
ClientToolGraphicsColor Color The color of the box drawn on the Map/PageLayout control display while using the DragRectangle or PageDragRectangle Client Action tools (while zooming in/out, for example).
ClientToolGraphicsWidth int Line width of shapes dragged on the Map/PageLayout controls while using a Tool.
EnableContinuousCallback bool Whether images will be fetched continuously during panning of the map or only when panning is complete.
ImageFormat WebImageFormat Format of output image.
InitialExtent InitialExtent The initial extent at which a control first renders.
PageLayoutResource GISResourceItemDefinition MapResource to display in PageLayout.
ToolItems PageToolItemCollection Collection of tool items.
UseMimeData bool Set true to store output images in session and stream them to the client or to store them on the file system instead.
VirtualDirectory string The path to the virtual directory in which images can be written, for example, ~/output/.


Event Type  Description
BeginCreateWebPageLayout Raised before a WebPageLayout is created.
BeginDisposeWebPageLayout Raised before a WebPageLayout is disposed.
BeginRefreshWebPageLayout Raised before a WebPageLayout is refreshed.
ContentsChanged Raised when the contents of this control (e.g. the extent) are changed.
DragImage Raised when the control processes a tool associated with the DragImage Client Tool Action.
DragRectangle Raised when the control processes a tool associated with the DragRectangle Client Tool Action.
EndCreateWebPageLayout Raised after a WebPageLayout is created.
EndDisposeWebPageLayout Raised after a WebPageLayout is disposed.
EndRefreshWebPageLayout Raised after a WebPageLayout is refreshed.
MapDragImage Raised when the control processes a tool associated with the MapDragImage Client Tool Action.
MapDragRectangle Raised when the control processes a tool associated with the MapDragRectangle Client Tool Action.
MapPoint Raised when the control processes a tool associated with the MapPoint Client Tool Action.
PageClick Raised when the PageLayout control has been clicked.
Point Raised when the control processes a tool associated with the Point Client Tool Action.