Common_CustomJavaScript_VBNet\AddArgumentsToWebRequest.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. ' Imports Microsoft.VisualBasic Imports System Public Partial Class AddArgumentsToWebRequest Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal eventArgs As System.EventArgs) ' Register the Postback button with the ScriptManager control so it issues ' postbacks asynchronously when clicked. Note that controls registered in ' this way must implement either INamingContainer, IPostBackDataHandler, or ' IPostBackEventHandler. ScriptManager1.RegisterAsyncPostBackControl(Button2) End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal eventArgs As System.EventArgs) ' Get the page request parameters Dim requestParameters As System.Collections.Specialized.NameValueCollection = Page.Request.Params ' Update label text with the custom request parameters. ' pageInputTag is from a hidden input element that is explicitly defined in page markup. ' dynamicInputTag is from a hidden input element that is dynamically added via JavaScript. ' inlineArgument is dynamically added to the page request via JavaScript before the request ' is sent to the server. Label1.Text = requestParameters("pageInputTag") Label2.Text = requestParameters("dynamicInputTag") Label3.Text = requestParameters("inlineArgument") End Sub End Class