AjaxManager.Redirect(url) Problem.

4 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 09 May 2014 Link to this post

    ajax manager dont redirect .

    i have master page with ajaxmanager.
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"  
                   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                       <asp:ScriptReference NotifyScriptLoaded="true" Path="~/Common/Scripts/jquery-1.9.0.js" />
                        <asp:ScriptReference NotifyScriptLoaded="true" Path="~/Common/Scripts/jquery-migrate-1.2.1.min.js" />
                        <asp:ScriptReference NotifyScriptLoaded="true" Path="~/Common/Scripts/jquery-2.1.1.min.js" />
                       <asp:ScriptReference NotifyScriptLoaded="true" Path="~/Common/Js/mainComp.js" />

    i have rad ajaxpanel and inside a button that has btnRedirect_Click onclick event at content page.
    my content page redirect code is below:
    protected void btnRedirect_Click(object sender, EventArgs e)
        string url = Functions.RouteUrlToFullUrl(RouteTable.Routes.GetVirtualPath(null, "route", new RouteValueDictionary { { "id", param1}, { "routeC", param2} }).VirtualPath);
                   RadAjaxManager AjaxManager = RadAjaxManager.GetCurrent(Page);              

    there is nothing. ajaxmanager or ajaxpanel dont redirect.
    Pls help.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 May 2014 in reply to Cuneyt Link to this post

    Hi Cuneyt,

    Please try the following C# code snippet which works fine at my end.

    protected void radbtnRedirect_Click(object sender, EventArgs e)
        //accessing the ajaxmanager inside the master page
        RadAjaxManager ajaxManager = (RadAjaxManager)this.Master.FindControl("RadAjaxManager1");

    Let me know if you have any concern.
  3. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 09 May 2014 in reply to Shinu Link to this post

    RadAjaxManager AjaxManager = (RadAjaxManager)this.Master.Master.FindControl("AjaxManager1");
    I used this i had two nested masterpage, i can see ajaxmanager1 at debug. but redirection is not working, it could related my working envirenment but there is no redirection.
    Thank you.
  4. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 09 May 2014 Link to this post


    I would suggest you to register Startup Script through the Script Manager like this:

    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myFunction", "Javascript:testRedirect();'", true);

    in order to redirect with ajax

    Maria Ilieva

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top