I am using ASP.net 2.0. There are two buttons in a page - Page 1. One button - Button A - does a postback and refreshes a gridview in that page. The other - Button B - makes a cross-page post back to another page - Page 2.
Here is the conflict. After I get to Page 2, I click "Back" button on the browser to go back to Page 1. (I do not want to refresh Page 1 so my entries in Page 1 can be preserved.) Then I click Button A. Instead of refreshing the gridview, I am led to Page 2 as if I clicked on Button B.
I figured, when I clicked on Button B the first time, a hidden field in Page 1 was written (by javascript generated by ASP.net). This way the server knows that the post back is for another page. That hidden field was not cleared when I went back to Page 1 and clicked Button A.
My idea to go around this is to make the Button A as cross-page post-back to itself. However, I need to add some codes so entries in Page 1 can be preserved during this cross-page postback.
Any better idea?
Seaport
Here is the conflict. After I get to Page 2, I click "Back" button on the browser to go back to Page 1. (I do not want to refresh Page 1 so my entries in Page 1 can be preserved.) Then I click Button A. Instead of refreshing the gridview, I am led to Page 2 as if I clicked on Button B.
I figured, when I clicked on Button B the first time, a hidden field in Page 1 was written (by javascript generated by ASP.net). This way the server knows that the post back is for another page. That hidden field was not cleared when I went back to Page 1 and clicked Button A.
My idea to go around this is to make the Button A as cross-page post-back to itself. However, I need to add some codes so entries in Page 1 can be preserved during this cross-page postback.
Any better idea?
Seaport