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

Allow User to Download File using Ajax

I am looking for a way to allow users to download a file from my site using ajax. The reason why i need to do this is because the files are quite big (50 megs normally). So when the user clicks the download button it actually looks as if the page is not responding because it has to stream the file from my Amazon S3 to the user.

A potentially dangerous Request.QueryString value was detected from the client when sending html markup from jquery post call to asp.net page

I m making an ajax call using jQuery to an ASP.NET page which acts as my ajax server page to save the data which i am sending to it in the query string. In the ASP.NET page when i am trying to read the querystring i am getting this error:

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