RadAjaxManager calls from JS only work first call if RadPane on page includes another page

1 Answer 83 Views
Ajax ScriptManager and StyleSheetManager
Dan
Top achievements
Rank 1
Iron
Dan asked on 09 Mar 2022, 12:07 AM

Hi There,

I have been reviewing quite a few forum posts and trying different suggestions, but I haven't found a solution that works for my situation. Help would be greatly appreciated. It's probably something simple that I'm missing.

I have a page that includes RadScriptManager, RadAjaxManager, RadSplitter, RadPane (with regular local content), RadSplitBar, and RadPane2 (contains other aspx pages like an iframe).

When RadPane2 contains another page, even if it's not an AJAX page, JavaScript calls to the RadAjaxManager from the primary page only fire the first time. I'm trying to call a method on the code behind page to update an item in a RadMenu.

If I have all the content is on one page without referring to a separate page, I can make multiple calls to the RadAjaxManager without problems.

Pieces of the code:

 <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                  <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="rmCounts"></telerik:AjaxUpdatedControl>
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
</telerik:RadAjaxManager>

 

        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
        <script type="text/javascript" language="JavaScript">
             function countUpdate() {
                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                ajaxManager.ajaxRequest("updateCounts");
                return false;      }
        </script>
        </telerik:RadCodeBlock>

Example code behind method:

        public void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            updateCountsCodeBehind();
        }

 

Thanks,

Dan

1 Answer, 1 is accepted

Sort by
0
Accepted
Dan
Top achievements
Rank 1
Iron
answered on 09 Mar 2022, 05:08 PM

Okay, my apologies. After further research with the JavaScript stack trace, I determine the problem was related to staticRewrites. On further AJAX calls, query string parameters were getting stacked on repeatedly due to my rewrite rules. This can be closed.

Thanks,

Dan

Tags
Ajax ScriptManager and StyleSheetManager
Asked by
Dan
Top achievements
Rank 1
Iron
Answers by
Dan
Top achievements
Rank 1
Iron
Share this question
or