TLDR: UpdatePanels or PageMethods?
As far as I can see, there three ways to build ASP.NET Web Forms applications:
- Full-page, synchronous postbacks
- Partial, asynchronous postbacks using UpdatePanels
- PageMethods (and web service methods) and manual JavaScript
- (I know there's ASP.NET MVC as well, but that's not part of the Web Forms family.)
I think everyone agrees nowadays that Option 1 no longer provides a satisfying user experience. (It might have worked for a while, but SmartNavigation got deprecated a long time ago, only supported IE and was never as stable as it should have been.)
The problem is that Option 2 and 3 don't really work together: As soon as you try to do something non-trivial with PageMethods (like filling a list with entries), the view state breaks, thereby breaking existing "UpdatePanel-based" code. Currently, there's no easy way to work around that.
Since UpdatePanels and PageMethods seem to be quite incompatible with each other, is there some official recommendation on which one to use for new projects?
To prevent this from becoming a subjective question, I'd like to restrict this question to official statements from Microsoft and (semi-)official statements from Microsoft employees.