Avoiding Page Refresh on F5
-
I am handing a GridView fully in client-side(am using callbacks to avoid page refresh). that is, i am having a certain No. of records in a GridView each bound with a check box, and while checking each of the checkboxes, i am doing some operation internally. When press F5 or refresh the page, the selected records are cleared. (To avoid this problem, i used ViewState to maintain the each record's status. But was helpless. But Session did well.) The concern is, i shouldn't use any Session Variables, and even after F5 the records must be without modifications. Or else, is it possible to avoid such page refreshing? Thanks in advance.
Muthu.G
-
I am handing a GridView fully in client-side(am using callbacks to avoid page refresh). that is, i am having a certain No. of records in a GridView each bound with a check box, and while checking each of the checkboxes, i am doing some operation internally. When press F5 or refresh the page, the selected records are cleared. (To avoid this problem, i used ViewState to maintain the each record's status. But was helpless. But Session did well.) The concern is, i shouldn't use any Session Variables, and even after F5 the records must be without modifications. Or else, is it possible to avoid such page refreshing? Thanks in advance.
Muthu.G
I think we should not capture any browser events except for the worst case. Your application is behaving as it should,User clicks refresh button/F5 to get last/latest/reset content. I don't understand why you want to restrict user not to click F5. If any data is getting lost then it totally beacuse of user unknowingness. Any way take a look at this article, Not so easy to avoid page refresh http://msdn2.microsoft.com/en-us/library/ms379557(VS.80).aspx#bedrockas_topic2[^]
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
I think we should not capture any browser events except for the worst case. Your application is behaving as it should,User clicks refresh button/F5 to get last/latest/reset content. I don't understand why you want to restrict user not to click F5. If any data is getting lost then it totally beacuse of user unknowingness. Any way take a look at this article, Not so easy to avoid page refresh http://msdn2.microsoft.com/en-us/library/ms379557(VS.80).aspx#bedrockas_topic2[^]
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Thanks for the article sandeep. The reason why i wanted to avoid is, i am selecting a No of records from a gridview that is in my page, where i use callback mechanism, to avoid page postback. The thing is, i don't render gridview to client side. So, obviously when F5 is pressed, the checked values will be lost..!!
Muthu.G