FileUpload Doesn’t Work When Nested In UpdatePanel? C#

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:FileUpload onchange="clickTheButton();" ID="FileUpload1" runat="server" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Button1" /> </Triggers> </asp:UpdatePanel> Button 1 is outside the update panel and the javascript that gets run when a user adds a file in the upload box is this: function clickTheButton() { document.getElementById('<%= Button1.ClientID %>').click(); } The problem is simple. FileUpload1.HasFile == false. … Read more

How to call a client side javascript function after a specific UpdatePanel has been loaded

How is it possible to call a client side javascript method after a specific update panel has been loaded? Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler) does not work for me because this will fire after ANY update panel finishes loading, and I can find no client side way to find which is the one ScriptManager.GetCurrent(Page).AsyncPostBackSourceElementID AsyncPostBackSourceElementID does not work for … Read more

How can I defer loading UpdatePanel content until after the page renders?

Old hand at ASP.NET, new to the UpdatePanel. I have a reporting page which executes a fairly length SQL query… takes about 10 seconds right now. What I would like to do is have my page fully render, with some placeholder text (Loading…) and then have the UpdatePanel kick off the actual time-consuming reporting process and render the report when it’s done.