smithmrk
asked on
ASP.net Open the Save Dialog
OK, so I have a window that opens using JavaScript:
Dim PopUpScript As String = "<script language='javascript'>" + "window.open('CrystalRepor tViewer.as px?SiteID= " & ddl_ProcessSite.SelectedVa lue & "&BDate=" & txt_StartDate.Text & "&EDate=" & txt_EndDate.Text & "&ReportID=" & rbl_ReportList.SelectedVal ue & "'" & ",'','width=1000px,height= 800px, status=no, resizable=yes, scrollbars=yes, toolbar=no,location=no,men ubar=no'). focus();</ script>"
Page.ClientScript.Register StartupScr ipt(Me.Get Type(), "PopUpWindow", PopUpScript, False)
BUT when I click one of my buttons on the form to export to Excel...it creates the Excel File but does NOT open the Save/Open Dialog Box:
'Output the Final String to a File for Download:
Response.ContentType = "application/ms-excel"
Response.AppendHeader("Con tent-Dispo sition", "attachment; filename=export.xls")
Response.TransmitFile(Serv er.MapPath ("~/Temp/e xport.xls" ))
Response.Flush()
Response.Clear()
Response.End()
WHY???
Thanks,
Mark
Dim PopUpScript As String = "<script language='javascript'>" + "window.open('CrystalRepor
Page.ClientScript.Register
BUT when I click one of my buttons on the form to export to Excel...it creates the Excel File but does NOT open the Save/Open Dialog Box:
'Output the Final String to a File for Download:
Response.ContentType = "application/ms-excel"
Response.AppendHeader("Con
Response.TransmitFile(Serv
Response.Flush()
Response.Clear()
Response.End()
WHY???
Thanks,
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Mark