View Single Post
  #2 (permalink)  
Old January 24th, 2012, 11:37 AM
vbboyd vbboyd is offline
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by vbboyd View Post
On page 292 of your book you state:
"Removing the check for Page.IsPostback is enough to accomplish this. However this is not always the desired solution. Imagine that you are getting correct display direction from a database. Because the number of times that you hit a database can be a costly operation, you want to minimize the number of times that you hit the database."

My question to you would be is not Viewstate a pricely and cumbersome overhead to the overall footprint of the application as well? Can Viewstate not also have a tendency to gum up the works so to speak on any .NET application?

Thank you for your attention to this matter.
I guess maybe I should clarify my question just a bit more. The real question becomes what factors do you use to balance using viewstate as opposed to hitting the database? Are there any hard and fast rules in .NET for any of this when making these considerations?
Reply With Quote