Wean Yourselves off View State From the Start
Posted by: AspNetResources.com articles, news and updates,
on 10 Jul 2009 |
View original | Bookmarked: 0 time(s)
Whenever I start a new project these days, I head straight to web.config and do this:
<pages
enableViewState="false"
enableSessionState="false"
autoEventWireup="false">
The key here is the first attribute. If you knock out view state right from the start, I can guarantee you will approach your site differently.
You won’t be tempted to drag and drop DataGrids, which are view state hogs because they depend on it for paging and sorting. To me, the DataGrid control is the ultimate...