Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Upload > RadUpload & RadAjaxManager - Disabling Ajax
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered RadUpload & RadAjaxManager - Disabling Ajax

Feed from this thread
  • Richard Weeks Intermediate avatar

    Posted on May 5, 2011 (permalink)

    I've read two related posts in this forum but have no solution yet, so here goes.

    First, I created a standalone page and verified that the upload was working, then I folded that code into my content page, which contains an AjaxManager in a Master page - then the fun started :)

    In my Master, this is the Ajax Manager:

    <telerik:RadAjaxManager ID="TelerikAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="TelerikDock"></telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    In my content page, I added some client side script:

    <script type="text/javascript">
    function ConditionalPostback(sender, args)
    {
        if (args.get_eventTarget() == "<%= this.FilesSave.UniqueID %>")
        {
            args.set_enableAjax(false);
        }
    }
    </script>

    And in my content page code-behind, disabled Ajax:

    protected void Page_Init(object sender, EventArgs e)
    {
        var ajaxManager = (RadAjaxManager)this.Master.FindControl("TelerikAjaxManager");
      
        ajaxManager.ClientEvents.OnRequestStart += "ConditionalPostback";
    }

    I then tried to save a file but nothing doing. No files are uploaded :(

    Any ideas if there is something else I need to do? I can see the code gets generated on the client side.

    Richard

    [Edit: May 6th] I also reasoned that perhaps it was the update panel in my master page, within which my content is located, i.e.:

    <asp:UpdatePanel 
        ID="MainUpdatePanel" 
        runat="server">
        <ContentTemplate>
      
                <asp:ContentPlaceHolder 
                    ID="MainContentPlaceHolder" 
                    runat="server">
                </asp:ContentPlaceHolder>
      
        </ContentTemplate>
    </asp:UpdatePanel>

    So I added a trigger:

    protected void Page_Init(object sender, EventArgs e)
    {
        var ajaxManager = (RadAjaxManager)this.Master.FindControl("TelerikAjaxManager");
      
        if (ajaxManager != null)
        {
            ajaxManager.ClientEvents.OnRequestStart += "ConditionalPostback";
      
            var trigger = new AsyncPostBackTrigger
                      {
                          ControlID = this.FilesSave.UniqueID,
                          EventName = "Click"
                      };
      
            var updatePanel = (UpdatePanel)this.Master.FindControl("MainUpdatePanel");
      
            if (updatePanel != null)
            {
                updatePanel.Triggers.Add(trigger);
            }
        }
    }

    But I'm just guessing now. Anyway, that didn't fix it either /sigh

  • Helen Helen admin's avatar

    Posted on May 10, 2011 (permalink)

    Hello Richard,

    Could you please open a support ticket and send us a sample project which demonstrates the issue to examine it locally?
    Otherwise we couldn't be sure where the problem might be.

    Kind regards,
    Helen
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Upload > RadUpload & RadAjaxManager - Disabling Ajax