problem with code download file - two window file download

S

Sam --

Hi all
I've a problem
I write code for download a file.
Sometimes when I run the code, the window of "File Download" appears
I push the "open" button and the window of "File Download" appears
again
This happens in this situation
windows 2003 - IE version 6.0.3790.0

note:
If i comment the line
********
Response.AppendHeader("content-disposition", "attachment;
filename=prova.xls")
*******
the problem does not happen but I cannot specify the name of the file



thanks
Sam --



'.......................................................................
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

With Response
.Clear()
.ClearContent()
.ClearHeaders()

End With

Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("content-disposition", "attachment;
filename=prova.xls")
Response.Write("test")
Response.End()
Response.Flush()
End Sub
 
G

Guest

Hi Sam,
I noticed a similar problem some time ago on machines installed with open
office instead of MS office. So if you dont have MS Office installed on your
machine or Excel viewer then check it on another machine.
HTH
srini
 
S

Sam --

Hi Sam,
I noticed a similar problem some time ago on machines installed with open
office instead of MS office. So if you dont have MS Office installed on your
machine or Excel viewer then check it on another machine.
HTH
srini
I have two machine with windows 2003 - IE version 6.0.3790.0
One has Office 2002
The other machine does not have Office for nothing
The two machines have installed SQL Server 2000 - sp3

Sam --
 

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,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top