Hi all.
I am using AJAX Tab Control to display a grid view in one tab and an IMAGE in another tab.
The image is created within the program and saved to "images" folder using Serve.MapPath.
Everytime the TAB index is changed, I do postback and call the code to create IMAGE. The image displays the value of dropdown box.
When I click the IMAGE TAB for the first time it is displaying the value of dropdown box correctly. But when I select another value and click the IMAGE TAB again it is not updating the image... it still shows the old image. But I am sure that the IMAGE is updated with new value (i can open the image from "images" folder manually and see the new value).
I am also sure that the page is posted back and new image is created (debugging revelas this).Even I change the tabs and come back to the image tab, it still shows old image..even thought the ImageUrl is pointing to the new (updated) image.
But when i press F5 (refresh) it is displaying the updated image with new value.
Can anyone help me solve this ? I dont want the user to press F5 everytime they select new value from dropdown box. I want the user to select new value and then press the TAB and display the new Image.
Thanks,
Chandra
Use this. it will work.
i think the cached output shown everytime.
to clear it, add the following code in the code behind.
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma","no-cache");
it will work.
Hi
Thanks for the reply. I have another problem! it works well in FIREFOX but not in IE!!
how can I solve this browser issues ?
Chandra.
Add the following line on top of the Page_Load event handler and your ASP.NET page will not be cached in the users browsers:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
it will work.
No comments:
Post a Comment