Last post Oct 25, 2018 01:29 AM by Jenifer Jiang
Oct 19, 2018 06:51 PM|profnachos|LINK
Here is the thread where the issue was raised, and here is the
When I implement this in an isolated environment (new website in Visual Studio only with one aspx page) it works.
What I have noticed is when I step through code is that when the page is refreshed, Page_PreRender does seem to execute when the page is refreshed, but ViewState is not updated. So the debugger does step through the code, but ViewState["update'] does not
change (even though in the immediate window, ViewState appears to change, but it doesn't).
void Page_PreRender(object obj,EventArgs e)
ViewState["update"] = Session["update"];
In my application, the above solution simply does not work. In my application, ViewState["update"] DOES change in Page_PreRender.
Oct 19, 2018 08:13 PM|mgebhard|LINK
The problem you are trying to solve is not clear. I think refreshing a page after a submit is causing the browser to display a submit prompt? If that's the problem then use the Post/Redirect/Get (PRG) pattern.
Oct 25, 2018 01:29 AM|Jenifer Jiang|LINK
When button click event is fired and then again page is refreshed, the last request is sent again to server.
It is just way of repeating last action on page refresh.
To avoid click event to fire again on page refresh, you can redirect to some page in button click event after completion of operation like: Response.Redirect("xxxx.aspx");
For more about the solution, you could refer to the article: