I ask this question. The stream you mentioned will interfere with the normal functioning of the pages, which of course you already have in mind. Although, I would say that it can be dangerous (against the function that you expect) and is contraindicated. Based on what I see from your question, I will permanently delete pages and pages and save all the logic on one and only page.
I would also be happy to hear what you are trying to avoid with this? Are these dual posts? How to duplicate content in a shopping cart? Partial / incomplete data insertions? With the described method of influencing the rear buttons, you may encounter one problem, but raise another. A wide range of browsers that can act very differently in such conditions.
I see two good options,
UserControl,
Create three UserControls, each of which has the logic of each page. You can programmatically upload them to the page. That is, the on bnButton_Click Event. User controls are loaded using LoadControl("PathToAscxFileOnDisk.ascx") .
Panel
I would also think of three <asp:PlaceHolder></asp:PlaceHolder> or perhaps better <asp:Panel></asp:Panel> to include all the logic.
In this case, you are completely free of feedback problems and can focus on moving your functions to business logic and use Code-File to control the flow in show / hide and populate controls in / from panels / UserControl controls. Perhaps you can also control the feedback URL / click and the enter / enter key.
And you mentioned Ajax,
Ajax is absolutely ready to make your page standstill (which means that you can work without cache, sessions, viewstate, etc. Although the problem is that users can move between pages. I think that even Ajax has less help in while you save a three-page solution.
I would say that a simple task is to move the aspx files to each ascx and create aspx as a master container. With this option, you even avoid duplicate names (for example, if you copy / paste code in the panel) and problems with the stream / logic of Page_Load.
source share