Sunday 15 July 2012

asp.net - page refresh detection code not working -


I found a good article about finding page refresh in this article: I tried to follow the code Vb A web form application written in .net

My problem is that when I refresh the page using the browser refresh button, the Boolean IPhone refresh always remains false. So, the code I'm trying to stop from executing on page refresh keeps me going.

Here's an example, if my vb.net code contains the code changed from the article:

  is slow as Boolean = IsPageRefresh = false protected sub account_set_load (sender EventArgs as an object, handle the Meal.Orport IfPostBack if not seeState ("ViewStateId") = System.Guid.NewGuid () session ("session ID") = ViewState ("ViewStateId"). ToString () Otherwise see "Stats" viewstate). ToString () & lt; & Gt; Session ("Session"). Toasting () Then IsPageRefresh = True End if the session ("session ID") = System.Guid.NewGuid (). ToString () ViewState ("ViewStateId") = Session ("session ID"). ) End if the last sub-protected sub account_set_load complete (sub-sender as the object, e-mail as the system). Then, if not (customer (sign (request ("key")) then add customer message ("invalid password reset key", messaging error.), Form authentication, signature () functions. Redirect (SiteLink.ResetPassword) Other ' If there is no end, the work Redirect (SiteLink.ResetPassword) has expired or 'End nothing if the end is ending sub  

I ask this to help I would like to ask that I Where is the mistake or better way?

I have seen many articles that show how to capture page refresh in code, but they use the prerenders method, and that solution

I hope I can get some positive feedback.

Many thanks.


No comments:

Post a Comment