Please help,
I have three asp .net pages page1.aspx page2.aspx and page3.aspx. The first page (page1.aspx) prompts the user to enter a total number which is stored as a Session variable called "TOTAL" another session variable called "LAST" is set to 0 and the program redirects to page2.aspx. page2.aspx gets the values of session "LAST" and "TOTAL". "LAST" is incremented by 1 each time the page is loaded until "LAST" >= "TOTAL" at which point program redirects to page3.aspx. I want to implement a "loop" with asp .net pages. The program works fine until after the third iteration of page2.aspx. After the third iteration the session variables have no value. I don't know why this is and can find no information on it. Any help/hints would be wonderful.
Below is a sample of the code on page2.aspx (done in the on_page_load method):
dim total as string = Session("TOTAL"
dim last as string = Session("LAST"
if (last < total) then
'Does some stuff
Session("LAST"
= Session("LAST"
+ 1
response.redirect("page2.aspx"
else
response.redirect("page3.aspx"
end if
I have three asp .net pages page1.aspx page2.aspx and page3.aspx. The first page (page1.aspx) prompts the user to enter a total number which is stored as a Session variable called "TOTAL" another session variable called "LAST" is set to 0 and the program redirects to page2.aspx. page2.aspx gets the values of session "LAST" and "TOTAL". "LAST" is incremented by 1 each time the page is loaded until "LAST" >= "TOTAL" at which point program redirects to page3.aspx. I want to implement a "loop" with asp .net pages. The program works fine until after the third iteration of page2.aspx. After the third iteration the session variables have no value. I don't know why this is and can find no information on it. Any help/hints would be wonderful.
Below is a sample of the code on page2.aspx (done in the on_page_load method):
dim total as string = Session("TOTAL"
dim last as string = Session("LAST"
if (last < total) then
'Does some stuff
Session("LAST"
response.redirect("page2.aspx"
else
response.redirect("page3.aspx"
end if