Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2012, 02:03 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default AJAX and View State

After reading your chapter on AJAX in your book I am still little bit fuzzy and confused how AJAX and ViewState interact with each other. With AJAX you are supposedly doing Asynchronous partial page postbacks,(is that correct?) but then how does it effect the ViewState data stored in Hex in hidden fields of the browser? Does the ViewState data also get posted back too? Also, does AJAX have any kind of performance benefit as far as the amount of data that is posted back to the server and does using AJAX on your webpages and thereby leaving a smaller footprint on the network server thereby improving performance of your website or it is all just cosmetic to have flicker free webpages?

Thanks once again.
 
Old February 22nd, 2012, 02:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

In many cases, the ViewState field is sent back and forth as well and then updated at the client for future post backs.

Quite often, there's a *perceived* performance improvement because flicker is reduced. Whether there's a real performance improvement depends on what you're sending back and forth. You can use tools such as Fiddler to find out the exact data being sent. Typically, you'll be sending fewer bytes (as not the entire page is sent), but at the server the complete page still goes through the page life cycle.

Using web services called from client side code (as explained in the book as well) or also a very interesting choice, and often a better alternative IMO. They give you snappy UI feedback (just as the UpdatePanel), but have much less overhead associated with them.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
The View State Issue vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 2 January 27th, 2012 10:06 AM
View state problem rabbit3 ASP.NET 2.0 Professional 0 October 23rd, 2007 08:55 PM
Javascript and View State VictorVictor ASP.NET 2.0 Professional 8 April 2nd, 2007 02:34 PM
Maintaining state in an Ajax page isme BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 April 27th, 2006 07:24 PM
Session State|View State|Do I have other options? rockon ASP.NET 1.x and 2.0 Application Design 2 October 5th, 2005 07:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.