SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom webpart control on a page which, upon page load, deletes the items from a list (displayed on the same page as the custom webpart).

After deleting the items, the code also populates it again.

Also, users can use dropdowns etc and click a submit button to filter data which populates the list.

Upon initial page load, the results are displayed correctly, for example 30 of 50 items displayed (you can use OOTB paging controls of the list to see the last 20 items).

However, when I click submit, instead of a re-populated list appearing, items appear to be added onto the list on top of existing items. Its bizarre!

Here is what happens:

1 - Page loads, list has 50 items, displays 30 of them on current view.

2 - I page to the next (last) page of items.

3 - I click submit (the page deletes all items from list and should have 50 items again)

4 - List now has 80 items! (i know this after paging).

I have no idea what is going on? Is this something to do with the timing of certain events?



share|improve this question
Yes, that is being used. It's not a code issue, as when debugging, the list count shows the correct number of items. – Perplexed Sep 7 '12 at 19:43
up vote 0 down vote accepted

Are you clearing your list control when you do a post back? The control will save state during the refresh.

Also which event are are you populating the data in?

Regards Simon

share|improve this answer
I have passed this on to someone else - so not my head ache any more! I will accept your answer anyway. thanks. – Perplexed Oct 29 '12 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.