No postback after savefile dialog

Posted on 2004-11-19
Last Modified: 2008-03-03

My Application allows user to download the file to his local machine, once it is saved the page doesn't refresh itself or continue doing what it should, it just sits there!

Why is that?

Cant i refresh the page once download is done.....Or do a poskback?

Thanks in advance...

Question by:KUMON2004
    1 Comment
    LVL 3

    Accepted Solution

    Hi Amit,
    ------------------------Either use this code------------------------------------------------------------
    Add following code in child form button code:
    Response.Write("<script>window.opener.location='ParentForm.aspx'; window.close();</script>");

    ParentForm.aspx is the parent form that call the child form. This code will refresh the parent page.
    ---------------------------- OR the below one ---------------------------------------------------
    If ur r using anchor tag <a> then make it server object like :-
    In html window:-
    <a runat=server id="lnkSaveFile" class="link" href="path_of_File">Download File</a>

    Also, In codebehind file (.cs) add following line in page load event:-
    or u can use "window.opener.location" incase "document.location.href"

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now