Hello,
I have an asp webform called default.aspx and a 2nd called webform1.aspx. After logging in with default.aspx I would like to call webform1 multiple times from default.aspx passing Session variables back and forth. To test this I created a simple web application with my two forms as shown below:
Server.Execute calls webform1.aspx but the webform1 page does not display. It returns to the line after the server.execute statement after executing. I need the webform1 page to display each time it is called so that I can accept inputs. Can some let me know what I am doing wrong?
regards
Pat
default.aspx.cs
public partial class _Default : Page
{
string status="active";
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
while(status == "active")
{
Server.Execute("~/WebForm1.aspx");
}
}
webform1.aspx.cs
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
return;
}
}