Hi, currently I'm trying to develop a ASP.NET web page implemented ICallBackEventHandler.
But I have some problems with F5 ....
This is what I did:
1. Get data from database, and display as a table
2. Using dropdownlist as the paging ( onchange call a javascript to get data and render to a table again )
3. Each row have a link to delete ( onclick call a javascript to delete, and then get current page number, get data and render table again)
Everything works just fine, until for example, I get data from table Student, which have 11 rows
I set max rows for 1 page is 5 , so I have 3 page ( inside dropdowlist )
Then I was at page 1, I try delete a row, any row, so I had 10 rows remains ( 2 page)
then I refresh using F5 , then I change to page 2..... this the problem.
After that I can not get any data, until I click on the address bar, and press enter, or start a new page, F5 just won't work.
Appriciate if anyone could help =) Thanks
Loading
Yuuki NguyenPosted Apr 29, 2009, 11:30 PM
I think it should be the cache problem from FireFox
Try to add this on your page load
this.Page.Response.AppendHeader("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform, pre-check=0, post-check=0, private");
this.Page.Response.AppendHeader("Pragma", "no-cache");
this.Page.Response.AppendHeader("Expires", DateTime.Now.ToString("r"));
You might also want to set this for firefox only so use this
if (Request.Browser.Browser.ToLower() == "gecko")
{
....(the code above)...
}
Yuuki
joseveeePosted May 4, 2009, 10:33 PM
joseveeePosted Apr 29, 2009, 6:35 AM
1. The problem only occurs on FireFox, its working fine on IE
2. The problem occurs when there is the increasing or decreasing of the number of pages
e.g: I have 11 rows, 5 rows will be 1 pages, so i have 3 pages total
Then I try to delete 1 rows, so I left 10 rows, which will be 2 pages only, so I refresh page using F5, then here it is, the problems
Same with insert, if I insert some rows which leading to increasing of pages , then f5, and then the problem.