This is a migrated thread and some comments may be shown as answers.

Ajax, Post and whats sent

1 Answer 61 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 04 Nov 2010, 03:28 AM
Using fiddler and viewing whats being posted during an ajax post i can see the view state and then all the __event hidden fields. After that i can see the id's of controls and values e.g. ctl00_BodyContent_ConsentTree_ClientState=%7b%....

Why are the ctl00_BodyContent_ConsentTree_ClientState... etc being added to whats being posted back?

Are these controls duplicated in the viewstate thats being posted back?

Can we send the post without them?

I have read the article http://www.telerik.com/help/aspnet/ajax/ajxtelerikajax.html and viewed the text below. 

So if we didn't post back the ctl00_BodyContent_ConsentTree_ClientState....etc we wouldn't be able to access there current values?

http://www.telerik.com/help/aspnet/ajax/ajxtelerikajax.html
Persistence of form values - all form values are sent to the server for processing during the AJAX request and are persisted between AJAX requests. All form controls can be referenced in the code-behind as if a postback occurred. This feature guarantees that your AJAX-enabled applications will not be limited to mere rendering of controls with AJAX, but can cover even the most complex scenario.  

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 04 Nov 2010, 01:13 PM
Hello Mark,

The way ASP.NET Ajax works, is that it posts back the entire form and only updates the area's that are enclosed in an UpdatePanel. It's exactly the same as a normal postback without the page "flash".  To answer your other questions, the controls are not duplicated and the postback cannot occur in any other way with ASP.NET Ajax.

If you want to speed up you app or not have it post the entire page you can use the XmlHttpPanel, which uses callbacks and is faster than RadAjaxPanel.

I hope that helps.
Tags
Ajax
Asked by
Mark
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or