This is a migrated thread and some comments may be shown as answers.

ListView Caching

4 Answers 68 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Vasja Petkovska
Top achievements
Rank 1
Vasja Petkovska asked on 26 Oct 2010, 11:17 PM
Hi! I am using ListView on one page and displaying images with paging by query string which is the number of the category of images i want to show. Lately, very often but not allways, when i click next on the pager, instead of the next images from the current category, i get images from an other category despite the fact that the query string is still the same. 
I am assuming the problem is because i am displaying different categories on one same .aspx page, and somehow the images are cached or something. Can you help me?

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Oct 2010, 09:43 AM
Hi Vasja,

I am afraid the provided information is not enough to make a solid suggestion. Please provide a full runnable demo, which exhibits the unexpected behavior.

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vasja Petkovska
Top achievements
Rank 1
answered on 28 Oct 2010, 09:55 AM
I cant provide a demo since you wont be able to reproduce this. It doesnt happen all the time.
The method is like

private void BindListView(int CategoryID)
{
var data = from c in db.Categories
join i in db.Images
where c.ID == CategoryID
select i;
ListView1.DataSource = data;
ListView1.DataBind();
}

..ListView1_PageIndexChanges(...)
{BindListView(CategoryID);}

Where CategoryID is Request.QueryString
0
Dimo
Telerik team
answered on 28 Oct 2010, 10:17 AM
Hello Vasja,

In this case the only thing that I can suggest you is to debug the code until you find out why wrong images are retrieved and displayed.

Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vasja Petkovska
Top achievements
Rank 1
answered on 28 Oct 2010, 10:25 AM
But the code is just fine, the problem is when this code is online and you browse the page with the listview very often it begins to cache the images. Debugging wont help since this is hardly reproducible. Ok thank you for your time
Tags
Calendar
Asked by
Vasja Petkovska
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Vasja Petkovska
Top achievements
Rank 1
Share this question
or