No postback after savefile dialog

Posted on 2004-11-19
Medium Priority
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

Accepted Solution

abanup earned 200 total points
ID: 12628449
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

807 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