ArcGIS Simple Server Object Extension
ArcGIS_Simple_Server_Object_Extension_VBNet\SimpleSOEWebApp_VBNet\Default.aspx.vb
' Copyright 2009 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.
' 

Imports Microsoft.VisualBasic
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.esriSystem
Imports ESRI.ArcGIS.Server
Imports ESRI.ArcGIS.Geometry
Imports SimpleSOEInterfaces_VBNet

Partial Public Class _Default
  Inherits System.Web.UI.Page
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
    ScriptManager1.RegisterAsyncPostBackControl(Button2)
  End Sub

  ' Simple example of calling a method on the SOE SOAP Proxy.  
  ' SOAP message is passed to the SOE, processed, and a SOAP response is generated.  
  Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs)
        Dim simpleSOEProxy As New SimpleSOEProxy.Yellowstone_SimpleSOE_VBNet()

        Dim timeOnSOC As String = simpleSOEProxy.GetServerTime()

        Dim jsResult As String = String.Format("window.status = '{0}'; alert('Time on SOC: {0}');", timeOnSOC)
        ' Register the call to processCallbackResult as a script on the client.
        System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, sender.GetType(), "servertime", jsResult, True)

  End Sub
End Class