Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 13th, 2007, 11:43 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to refresh page after save dialog

I using save dialog class from dot net to open a a save dialog to let user save file to the local machine. But after that, my page stand there and do nothing for the rest of my process. I use below code to open a save dialog

Private Sub Browse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Browse.Click

 Response.Clear()

         Response.AddHeader("Content-Disposition", "attachment; filename=A.txt")
         Response.AddHeader("Content-Length", file.Length.ToString())
         Response.ContentType = "application/octet-stream"
         Response.BinaryWrite(file)
         Response.Flush()
         Response.Close()

end sub

the html code is below:
<asp:Button id="Browse" runat="server"></asp:Button>

but after the file is save to loca machine and the save dialog is close, my page no response at all. May I know how to do a postback to the page after the save dialog is close. Or any way to continue the rest of my code?

Thanks so much.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I forcefully opne the save dialog box janakiraman ASP.NET 3.5 Basics 1 April 16th, 2008 07:35 AM
Save As Dialog in web forms collie ASP.NET 1.0 and 1.1 Basics 0 March 18th, 2008 08:41 AM
Save As Dialog Box prasanta2expert Access VBA 0 June 23rd, 2007 07:35 AM
Save Dialog Box Camer Servlets 9 February 23rd, 2006 09:10 AM
Save dialog box mcinar Classic ASP Basics 6 January 15th, 2005 12:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.