Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Generate file dynamically for download in UpdatePanel.

$
0
0

Good day.

I've created page on which user can press the button and the download of automatically generated file starts.

As a solution i used this article http://www.codeproject.com/Articles/15649/Create-and-download-text-file-from-a-web-page.

But now i have a problem - after the button pressed first time file download dialog appears. But when i close file dialog and press button again than onclick event does not fire. Is there any way to make that after second click download dialog appeares also? 

Here is block of my code:

<asp:UpdatePanel runat="server" ChildrenAsTriggers="true">
        <ContentTemplate>
                <asp:Button ID="GenerateFile" runat="server" Text="Generate File" OnClick="GenerateFile_OnClick"
                    Height="25px" Width="100px" ValidationGroup="MainGroup" />
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="GenerateFile" />
        </Triggers>
</asp:UpdatePanel>

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>