Hi All,
Ok, I have the following button to prompt to export asp page data to excel...
The TestExcel.asp page uses:Code:function exportToExcel(){ answer = confirm("Are you sure you want to export? Click Save and export to your computer!") if (answer == 1) location.href = "TestExcel.asp?DistrictID=<%= sDistricts %>&TypeID=<%= sTypeID %>" }
Well, if I pass TypeID=1 or 2 or nothing it works fine...but when passing =3 it doesn't work...Code:Response.ContentType = "application/vnd.ms-excel"
when you get the prompt to "Open" or "Save" it displays you the
FileName:
Type:
From:
Well, instead of showing the normal info like so:
when I pass =3 it shows me this and doesn't download:Code:FileName: TestExcel.asp Type: Microsoft Excel Worksheet, 218kb From: servername
Code:FileName: ...TestExcel_asp?DistrictID=2TypeID=3 Type: Microsoft Excel Worksheet, 25.0kb From: servername



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks