Error when export to excel

S

siLver

Hi..

I'm trying to export to excel.. using:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-disposition", "attachment;filename=" & sFileName
Response.AddHeader "Location",
"http://www.ascendas.com/chinapartnerrewards/" & sFileName

<html xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
..............
</html>

but the result i got was v irregular..

Firstly, i had 3 different location that tigger this file..
1) navagtion using flash file
2) a href pointin to the same url
3) a button also pointing to the url

The button i had no problem.. but the navagation give me different results
every time i tigger it.. 1st tigger --> popup showing to open or save the
excel file (correct result).. 2nd tigger --> popup showing to open or save as
asp file(wrong result)
3rd tigger --> no popup at all, the result was show at the IE itself.. but
once i clear the cache(cookies) in the IE the result wil reset itself to the
1st tigger result..

So as my <a href> some times it works.. some time it don't..

Is there any code that i can add in to solve this problem??
I had tried adding the cachecontrol.. but it will block out my download of
excel completely..

Thanx lotx..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top