- Joined
- Jul 14, 2001
- Messages
- 9
My application opens a second web form to do calculations. I use Response.Redirect to open the second page.
When returning to the first page, I need all the values to be retained. In order to do this, the Return button (btnClose) in the second form uses this in Page_Load:
This makes btnClose work as if the user clicked the back button.
This works great except for one thing. Once returning to to the first web page, a click on any button re-opens the previous, second web form.
I am sure that there is a better way to do this, I can open the second page as a pop-up using JaveScript. This leaves the first page open, which is great. But what I cannot figure out is how to close the second page after being done with it.
Any help would be greatly appreciated!
When returning to the first page, I need all the values to be retained. In order to do this, the Return button (btnClose) in the second form uses this in Page_Load:
Code:
btnClose.Attributes.Add("onClick", "javascript:history.back(); return false;")
This makes btnClose work as if the user clicked the back button.
This works great except for one thing. Once returning to to the first web page, a click on any button re-opens the previous, second web form.
I am sure that there is a better way to do this, I can open the second page as a pop-up using JaveScript. This leaves the first page open, which is great. But what I cannot figure out is how to close the second page after being done with it.
Any help would be greatly appreciated!