M
mathieu cupryk
I have a form on step1.aspx and step2.aspx
When I click the button I do a server.transfer (step2.aspx, true). If I
use click the previous button I have in step2.aspx it calls a
server.transfer (step1.aspx, true).
I would like to see the form step1.aspx with all the values displays
instead of the textboxes empty.
more example of what I need to do?
I am passing variables from one form page to another form page in aspx.
Now if I do a click on the second page to go back to the first page all
The text fields are empty. How do I keep them?
void Button2_Previous (object sender, ImageClickEventArgs e)
{
Server.Transfer("step1.aspx",true);
}
<TITLE>ASPNETPage1.aspx</TITLE>
<%@ Page language="c#" %>
<script runat=server>
// We iterate through the Form collection and assign the names and
values
// to ASP.NET session variables! We have another Session Variable,
"DestPage"
// that tells us where to go after taking care of our business...
private void Page_Load(object sender, System.EventArgs e)
{
for(int i=0;i<Request.Form.Count;i++)
{
Session[Request.Form.GetKey(i)]=Request.Form.ToString();
}
Server.Transfer(Session["DestPage"].ToString(),true);
}
</script>
========================================================================
======
<TITLE>FinalPage.aspx</TITLE>
<%@ Page language="c#" %>
<script runat=server>
// This page is just a "proof of concept page"...
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("Shared Session Variable Names/Values between Classic ASP
and ASP.NET:<BR>");
for (int i = 0; i < Session.Contents.Count; i++)
{
Response.Write("Assigned to \"" +Session.Keys.ToString()+"\"");
Response.Write(" Value: "+ Session.ToString() +"<BR>");
}
}
</script>
When I click the button I do a server.transfer (step2.aspx, true). If I
use click the previous button I have in step2.aspx it calls a
server.transfer (step1.aspx, true).
I would like to see the form step1.aspx with all the values displays
instead of the textboxes empty.
more example of what I need to do?
I am passing variables from one form page to another form page in aspx.
Now if I do a click on the second page to go back to the first page all
The text fields are empty. How do I keep them?
void Button2_Previous (object sender, ImageClickEventArgs e)
{
Server.Transfer("step1.aspx",true);
}
<TITLE>ASPNETPage1.aspx</TITLE>
<%@ Page language="c#" %>
<script runat=server>
// We iterate through the Form collection and assign the names and
values
// to ASP.NET session variables! We have another Session Variable,
"DestPage"
// that tells us where to go after taking care of our business...
private void Page_Load(object sender, System.EventArgs e)
{
for(int i=0;i<Request.Form.Count;i++)
{
Session[Request.Form.GetKey(i)]=Request.Form.ToString();
}
Server.Transfer(Session["DestPage"].ToString(),true);
}
</script>
========================================================================
======
<TITLE>FinalPage.aspx</TITLE>
<%@ Page language="c#" %>
<script runat=server>
// This page is just a "proof of concept page"...
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("Shared Session Variable Names/Values between Classic ASP
and ASP.NET:<BR>");
for (int i = 0; i < Session.Contents.Count; i++)
{
Response.Write("Assigned to \"" +Session.Keys.ToString()+"\"");
Response.Write(" Value: "+ Session.ToString() +"<BR>");
}
}
</script>