I confused why I can't refresh my pages
-
I have an application comprised of 6 web forms. The first page is the main page, and is responsible for loading the others. I only use Server.Transfer to load these pages. According to MSDN, using Server.Transfer will run the new form in the context of the current form. This means that the new form will be running in the same environment as its caller and will be able to access the same variables as if they were its own. In that case, when I am on a certain form and I click the browser's "refresh" button, that page should be able to refresh itself, right? But why do I keep on getting this error: "The page cannot be refreshed without resending the information. Click retry to send the information again, or click Cancel to return to the page that you were trying to view" By using Server.Transfer, I'm not really sending any information from one page to another, right. I'm so confused and want to eliminate this problem. How can I do it?
-
I have an application comprised of 6 web forms. The first page is the main page, and is responsible for loading the others. I only use Server.Transfer to load these pages. According to MSDN, using Server.Transfer will run the new form in the context of the current form. This means that the new form will be running in the same environment as its caller and will be able to access the same variables as if they were its own. In that case, when I am on a certain form and I click the browser's "refresh" button, that page should be able to refresh itself, right? But why do I keep on getting this error: "The page cannot be refreshed without resending the information. Click retry to send the information again, or click Cancel to return to the page that you were trying to view" By using Server.Transfer, I'm not really sending any information from one page to another, right. I'm so confused and want to eliminate this problem. How can I do it?
You obviously input something on the default page to cause it to transfer to another, even if it was only click a button. That is the information it wants to send again. You are actually transmitting that information back to the default page (look at your URL, it doesn't change when you transfer). If you do a Redirect instead, it would work (no information going along with it). But that causes a round trip to the server.