ArcIMS BlueViewer
ArcIMS_BlueViewer_VBNet\default.aspx.vb
' Copyright 2011 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.
' 

 

Namespace BlueViewer

Partial Class MapPage
    Inherits System.Web.UI.Page


#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

    If Not IsPostBack Then
        Session.Add("VALID_USER", True)
        hvMapPage.Value = "MakeMap.aspx"
    End If

    If (Request.QueryString("XMIN") = Nothing Or _
        Request.QueryString("YMIN") = Nothing Or _
        Request.QueryString("XMAX") = Nothing Or _
        Request.QueryString("YMAX") = Nothing) Then

        ' 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")
    End If
    End Sub
End Class

End Namespace