I have an Entry Form and a GridView on the same page. Selecting a row from the GridView populates the TextBoxes in the Entry Form above it with all the entries of the GridVi
I agree with Kevin M and Aristos. Additionaly there is another way how to minimize transfered ViewState size: store it on server side using custom viewstate provider. This article describes how to create such provider: http://www.codeproject.com/Articles/8001/ViewState-Provider-an-implementation-using-Provide.
What pitfalls arise by using a custom view-state provider?
As stated in all posts, you can do some form of compression in multiple ways, you can implement it yourself or buy a viewstate compressor, but that won't help you too much. What might be interesting is the amount of compression you should expect. Take a look at: RadCompression to gets some info on compression rates, and performance improvements that are generally the same for all choices (free/paid).
My opinion that rates are not satisfactory, and you should look for design alternatives for your problem.
Now, if I understand correctly you want to edit a grid row in a form on the same page. From the comments, you are using an update panel, and by the behavior described you have both your grid and edit form in an update panel. If your page has only the grid and edit form, having them in an update panel won't help at all.
I've made a small example for test purpose and I had a 10 rows grid with 5 columns and an edit form for the 5 fields on the same page. My observations are:
That's because using an update panel basically means that you are not refreshing the entire page, but only the area inside your updatepanel + viewstate. So, if all your page is surrounded by the update panel, that won't help you at all, and it's not fair to call it AJAX :).
Now, asp.net web forms has it's strengths but my opinion is that nobody likes asp.net web forms anymore, especially when having asp.net mvc / wcf / jquery at hand. Your question proves one of the limitations of asp.net web forms when used as originally intended.
My general solution for your problem would be:
First thing, if you're using an UpdatePanel don't. It's not very efficient. In effect it does as full post back, which you're obviously trying to avoid.
Why not use a GET AJAX request? This will not post anything to the server, other than the URL your passing which could include the Id of the row you need?
Basically:
Create a WebService that will return the data you need.
Bind an onclick event to the Select button on every row on the grid. (Probably easiest done on the bind event server side, use the binding object to get the Id of the row)
In the event call the webservice created above (http://api.jquery.com/jQuery.get/)
In the onSuccess method of the javascript event build the entry as required.
Short answer is NO.
Here is a way to free page from clutches of viewstate on ajax calls
From the moment that you use UpdatePanel
, out of the box ajax call you are stick to send all form post data, including the big view state.
You have two ways, one is to make custom made, ajax call that are focused only to the change that you control, and not the full post back that UpdatePanel do.
The other way is to minimize what page send back with each post back, and compress the viewstate.
To compress the viewstate I suggest some pages here that have ready to use source code.
http://www.codeproject.com/Articles/14733/ViewState-Compression
http://www.hanselman.com/blog/ZippingCompressingViewStateInASPNET.aspx
http://www.bloggingdeveloper.com/post/How-To-Compress-ViewState-in-ASPNET-20-ViewState-Compression-with-SystemIOCompression.aspx
and a similar question that I did: How to limit the number of post values on UpdatePanel?