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

Requests Are not AJAX

2 Answers 104 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 29 Mar 2011, 03:52 PM
Hi,
I'm having trouble with AJAX (yet again).
I have a RadAjaxManager on the master page which is meant to ajaxify a panel:
<telerik:RadAjaxManager ID="DarRadAjaxManager" DefaultLoadingPanelID="DarRadAjaxLoadingPanel" runat="server">       
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="MainPagePanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="MainPagePanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Inside the panel is a RadTabstrip which has a SiteMap as a Datasource:
<asp:Panel ID="MainPagePanel" CssClass="mainBody" runat="server">
    <telerik:RadTabStrip ID="DARRadTabStrip" runat="server" DataSourceID="ApplicationSiteMap" CausesValidation="false">
    </telerik:RadTabStrip>
 
    <asp:SiteMapDataSource ID="ApplicationSiteMap" runat="server"
                            SiteMapProvider="XmlSiteMapProvider"
                            ShowStartingNode="False" />
 
    <asp:ContentPlaceHolder id="MainContentPlaceHolder" runat="server">
    </asp:ContentPlaceHolder>
</asp:Panel>

It all works fine. There's just no ajax. A quick call to the IsAjaxRequest method of the RadAjaxManager proved that.

How can I get that working with Ajax?

2 Answers, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 31 Mar 2011, 02:40 PM
Hello David,

You are right and your code really makes post-back instead of ajax call when you click on the tabs. However, this is not an RadAjaxManager issue. You can actually duplicate the same behavior if you use asp:UpdatePanel.

In this online demo exact the same behavior can be seen. Post-back is happening because the buttons of the TabStrip are rendered like a hrefs. So when you click on them it is happening the same as when you click on normal link.

Moreover, attached to this message is a sample website for a quick example.

Regards,
Vasil
the Telerik team
0
David
Top achievements
Rank 1
answered on 07 Apr 2011, 08:51 AM
Hi Vasil,

You are quite right. I was getting confused in that some TabStrips in this project are underpinned by SiteMaps, whereas others use event-handlers for navigation (with AJAX).

Thanks for helping me out.
Tags
Ajax
Asked by
David
Top achievements
Rank 1
Answers by
Vasil
Telerik team
David
Top achievements
Rank 1
Share this question
or