ArcIMS_BlueViewer_CSharp\default.aspx.cs
// Copyright 2010 ESRI // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // You may freely redistribute and use this sample code, with or // without modification, provided you include the original copyright // notice and use restrictions. // // See the use restrictions. // using System.Configuration; namespace BlueViewer { public partial class MapPage : System.Web.UI.Page { [System.Diagnostics.DebuggerStepThrough()] private void InitializeComponent() { } override protected void OnInit(System.EventArgs e) { base.OnInit(e); InitializeComponent(); } override protected void OnLoad(System.EventArgs e) { base.OnLoad(e); if (! IsPostBack) { Session.Add("VALID_USER", true); hvMapPage.Value = "MakeMap.aspx"; } if (Request.QueryString["XMIN"] == null | Request.QueryString["YMIN"] == null | Request.QueryString["XMAX"] == null | Request.QueryString["YMAX"] == null) { // If no initial extent is defined in the incoming QueryString, default // to the extent defined in web.config. hvMinX.Value = ConfigurationManager.AppSettings["DEFAULT_EXTENT_XMIN"]; hvMinY.Value = ConfigurationManager.AppSettings["DEFAULT_EXTENT_YMIN"]; hvMaxX.Value = ConfigurationManager.AppSettings["DEFAULT_EXTENT_XMAX"]; hvMaxY.Value = ConfigurationManager.AppSettings["DEFAULT_EXTENT_YMAX"]; } else { // If we have a valid and complete extent defined in the QueryString, // use these values as the inital extent. hvMinX.Value = Request.QueryString["XMIN"]; hvMinY.Value = Request.QueryString["YMIN"]; hvMaxX.Value = Request.QueryString["XMAX"]; hvMaxY.Value = Request.QueryString["YMAX"]; } } } }