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.