Server.Execute() does not wait for the second aspx page to finish executing?
Server.Execute() does not wait for the second aspx page to finish executing? I have an aspx page that executes another aspx page through Server.Execute() since I need the called aspx page to postback in order to grab a session variable. However, I have noticed in my code that when the Server.Execute() is called, it does not wait for the called page to load up and posback, the code just goes on and the page is only loaded after the function is finished? Does anyone know how to fix this? Below is the code I am using in the parent page to call the page I want to load. Imports System.IO Public Class TriggerPage Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Server.Execute("SvgForm.aspx", False) 'This variable is only populated after the SvgForm.aspx executes and posts back since the Session variable is initialized there Dim htmlCode As String = Session("svgVariable") End Sub End Cl...