Uploader inside AJAX CollapsiblePanelExtender doesn't work

Last post 02-28-2009, 1:58 AM by danparks. 2 replies.
Sort Posts: Previous Next
  •  02-27-2009, 7:42 PM 49349

    Uploader inside AJAX CollapsiblePanelExtender doesn't work

    I have an Uploader that works fine. When I add it to an AJAX CollapsiblePanelExtender, the Browse button (the button defined by InsertButtonID) is no longer recognized - clicking on it doesn't do anything. I copy the code and paste it outside the collapse panel, and it again works.
     
    Any ideas?
     
    Dan
  •  02-27-2009, 9:16 PM 49350 in reply to 49349

    Re: Uploader inside AJAX CollapsiblePanelExtender doesn't work

    Hi danparks,
     
    It works fine for me, please test the example below:
     
    If you still get this issue, please create a page can reproduce this issue and send it to me.
     
    My E-mail address: [email protected]
     
    --------------------------------------------------------------------------------------------------------------------------------------

    <%@ Page Language="C#" %>

    <%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" TagPrefix="ajax" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>test</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <ajax:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="Panel1"
                CollapseControlID="Button1" ExpandControlID="Button1">
            </ajax:CollapsiblePanelExtender>
            <asp:Button ID="Button1" runat="server" Text="HideAndShow" />
            <asp:Panel ID="Panel1" runat="server" Height="400" Width="400">
                <CuteWebUI:Uploader ID="uu1" runat="server" InsertButtonID="Button2">
                </CuteWebUI:Uploader>
                <asp:Button ID="Button2" runat="server" Text="upload" />
            </asp:Panel>
        </div>
        </form>
    </body>
    </html>
    ---------------------------------------------------------------------------------------------------------------------------------------
     
    Regards,
     
    Ken
  •  02-28-2009, 1:58 AM 49353 in reply to 49350

    Re: Uploader inside AJAX CollapsiblePanelExtender doesn't work

    Okay, I've got it working.
     
    One of the attributes of the CollapsiblePanelExtender is SuppressPostBack, which you can set to true or false. Before adding the Cute Uploader I had an UpdatePanel within the target of the collapse panel extender, and I had SupressPostBack set to true. So expanding and collapsing the panel was nice and smooth. When I added the Uploader, I removed the UpdatePanel, but I didn't get rid of the SupressPostBack=true. So there was no postback happening, and the Uploader could not fully function.
                                    
    So, in short, the Cute Uploader works fine within an AJAX CollapsePanelExtender. Just make sure a postback can occur.
                                    
    Thanks for your quick response, and simplified, working example. Very helpful.
                                    
    Dan
View as RSS news feed in XML