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

Ajax Request reloads all controls, not just selected control

1 Answer 102 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 12 Apr 2011, 03:39 PM
A little confused about the way Ajax is working.  Based on the markup below, I was under the impression that if RadTextBox1 gets changed, this will cause a autopostback via AJAX, to execute RadTextBox2 server code.  Whats happening is that all three textbox server code is running on Load event.  It seems like the whole page is being refreshed.  Can someone explain why?

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadTextBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTextBox2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTextBox2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTextBox3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
                  </AjaxSettings>

    </telerik:RadAjaxManagerProxy>

    <telerik:RadTextBox ID="RadTextBox1" AutoPostBack="true" runat="server">
    </telerik:RadTextBox>
    <telerik:RadTextBox ID="RadTextBox2" AutoPostBack="true"   runat="server">
    </telerik:RadTextBox>
    <telerik:RadTextBox ID="RadTextBox3" AutoPostBack="true"  runat="server">
    </telerik:RadTextBox>

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 15 Apr 2011, 08:30 AM
Hello Dan,

Using ajax requests to update parts of your page (in your case specific controls) does not mean that you are avoiding the page life cycle - it just means that the update to the HMTL of the page is happening asynchronously and only the mark-up of the ajaxified controls will be refreshed. Other than that, an ajax request triggers the full page life cycle as a regular post-back and all the controls' event will be fired accordingly.

Hope this information helps. 

All the best,
Tsvetoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Ajax
Asked by
Dan
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or