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

Good morning! I'm porting an existing custom 2010 webpart containing a ListView and a DataPager to 2013 and seeing some weirdness with the DataPager and I believe the cause is associated with the usage of AppFabric for ViewState in 2013. Here's the recap:

I have a ListView that I'm binding to a datasource programmatically in code-behind based on user button clicks (search filters). I've implemented the basic DataPager support and wired up the ListView OnPagePropertiesChanging event handler to forward page size and start index and rebind the data (identical to most examples on the web and working great in 2010). In 2013, I'm finding that unless I have a debugger attached and breakpoints set, the EventArgs for OnPagePropertiesChanging that contains the start index and page size ALWAYS contains values of 10 and 10, even when I've explicitly set the control to something like Page size of 3. Repeated Next button clicks always yield values of 10 and 10 on entry to the event handler. I believe this is a timing issue with ViewState not being populated yet with the values from AppFabric when PostBacks occur, but I don't know quite what to do about it.

Any thoughts?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.