View Single Post
  #3 (permalink)  
Old March 1st, 2006, 03:33 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Richard,

Wouldn't it be a lot better to disable ViewState on the GridView altogether?

In ASP.NET 1.x, that also meant you lost state for important events (sorting, paging etc), but in .NET 2 this is now stored in control state, separate from ViewSate.

So, I think you're better off setting EnableViewState to False in the control declaration...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: We've Got A Bigger Problem Now by Dead Kennedys (Track 20 from the album: Plastic Surgery Disasters + In God We Trust) What's This?