Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
ASP.NET
ASP.NET General Discussion
Abuse of Viewstate
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Administrator" data-source="post: 1738" data-attributes="member: 2"><p>In reviewing an e-commerce application (BV Commerce 2004) I'd like to share my opinion on the use of, or misuse in this case, viewstate.</p><p></p><p>As many know, viewstate is a "storage" mechanism for persisting information, typically designed for preserving values during a postback for server controls such as textboxes, etc. Viewstate is a nice feature, but if not used properly, can significantly impact performance of any asp.net web site. </p><p></p><p>In the scenario of this e-commerce application I reviewed viewstate is being used to store far more then just page level server controls and in doing this, you are asking "the client" to carry the burden of your programming. Realize that the more you "grow" viewstate, the larger the pages become and the client has to pass this back and forth to the server, and we all know not everyone has a 100 mbit connection to the world! </p><p></p><p>There are alternatives, such as "server side" viewstate which is actually covered in this months asp.NET PRO magazine, session variables, shared variables, and many other options that are far more effective then asking your web surfers/visitors to be carrying your load.</p><p></p><p>So those designing effectively with performance in mind, taking advantage of the increased performance of ASP.NET need to look really hard at the use, or abuse in this case, of viewstate. Viewstate can be your friend, but rapidly grow to be your enemy. Those using Datagrids know viewstate can get ugly fast, look at the server side viewstate storage options using the Page Overloads of:</p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">LoadPageStateFromPersistenceMedium and <span style="font-size: 10px">SavePageStateToPersistenceMedium</span></span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">Although again this is not recommended for high activity web sites as you are now putting the load on the server, you have to decide again WHAT you are going to use Viewstate for and keep it to a bare minimum.</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">Bottom line: Design for performance, don't penalize your web visitors and make them carry the burden of your programming! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></span></p><p><span style="font-size: 10px"><span style="font-size: 10px"> </span></span></p><p><span style="font-size: 10px"><span style="font-size: 10px"></span></span></p></blockquote><p></p>
[QUOTE="Administrator, post: 1738, member: 2"] In reviewing an e-commerce application (BV Commerce 2004) I'd like to share my opinion on the use of, or misuse in this case, viewstate. As many know, viewstate is a "storage" mechanism for persisting information, typically designed for preserving values during a postback for server controls such as textboxes, etc. Viewstate is a nice feature, but if not used properly, can significantly impact performance of any asp.net web site. In the scenario of this e-commerce application I reviewed viewstate is being used to store far more then just page level server controls and in doing this, you are asking "the client" to carry the burden of your programming. Realize that the more you "grow" viewstate, the larger the pages become and the client has to pass this back and forth to the server, and we all know not everyone has a 100 mbit connection to the world! There are alternatives, such as "server side" viewstate which is actually covered in this months asp.NET PRO magazine, session variables, shared variables, and many other options that are far more effective then asking your web surfers/visitors to be carrying your load. So those designing effectively with performance in mind, taking advantage of the increased performance of ASP.NET need to look really hard at the use, or abuse in this case, of viewstate. Viewstate can be your friend, but rapidly grow to be your enemy. Those using Datagrids know viewstate can get ugly fast, look at the server side viewstate storage options using the Page Overloads of: [size=2] LoadPageStateFromPersistenceMedium and [size=2]SavePageStateToPersistenceMedium[/size] [size=2][/size] Although again this is not recommended for high activity web sites as you are now putting the load on the server, you have to decide again WHAT you are going to use Viewstate for and keep it to a bare minimum. Bottom line: Design for performance, don't penalize your web visitors and make them carry the burden of your programming! :) [size=2] [/size][/size] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
ASP.NET
ASP.NET General Discussion
Abuse of Viewstate
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom