Issue with writing to Excel

J

Jim Corey

I'm using the following code in both ASP and ASP.NET:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment;filename=report.xls"
Response.Write "<HTML>"
Response.Write strOut 'string contains an HTML table
Response.Write "</HTML>"


When I do this in ASP, I get a dialog asking if I want to download and
warning me.

When I do this in ASP.NET, I get the same dialog twice.

Any ideas why? In ASP.NET I'm using a button in an ascx file. When I debug
I only go through
this code once.

Thanks,
Jim
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top