the-master-freak
New Member
save dialog saves 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\[code\]protected void lnkbtnDownload_Click(object sender, EventArgs e){ string fileName = startupPath + "bin\\Inbox.mdb"; System.IO.FileInfo targetFile = new System.IO.FileInfo(fileName); if (targetFile.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + targetFile.Name); Response.AddHeader("Content-Length", targetFile.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(targetFile.FullName); Response.End(); }}\[/code\]the html code is :\[code\]<asp:Button id="lnkbtnDownload" runat="server" CausesValidation="false" Text="Download" CssClass="buttonstyle" OnClick="lnkbtnDownload_Click"></asp:Button>\[/code\]but after the file is save to local 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.?