Thanks Carl and I am sorry for cross posting. I just did not know any
better.
Your response assumes that I need to create an excel file using ASP.NET.
The problem is that I already have the Excel file on the server. All I want
to do is download it. But not using the anchor nor the hyperlink tags.
Ali
http://support.microsoft.com/default.aspx?scid=kb;en-us;318756&Product=aspne
t
> Also, please don't cross-post to so many newsgroups.
>
[quoted text clipped - 3 lines]
> Carl Prothman
> Microsoft ASP.NET MVP
To go along with Carl's answer, you can use the Response.Writefile method.
Something like this should work:
Response.Clear();
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition","attachment;filename=myfile.xls");
Response.WriteFile("myfile.xls");
Here's more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwebhttpresponseclasswritefiletopic.asp
http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309so_l/asp200309so_l.asp

Signature
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
> Thanks Carl and I am sorry for cross posting. I just did not know any
> better.
[quoted text clipped - 4 lines]
>
> Ali
http://support.microsoft.com/default.aspx?scid=kb;en-us;318756&Product=aspne
> t
>
[quoted text clipped - 10 lines]
> > You are missing the ContentType setting.
> > Response.ContentType = "application/vnd.ms-excel"
http://support.microsoft.com/default.aspx?scid=kb;en-us;318756&Product=aspne
> t
> >
[quoted text clipped - 5 lines]
> > Carl Prothman
> > Microsoft ASP.NET MVP
Ali - 30 Dec 2003 00:33 GMT
Exactly what I needed Steve. Thanks Dude.
Ali
> To go along with Carl's answer, you can use the Response.Writefile method.
> Something like this should work:
>
> Response.Clear();
> Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition","attachment;filename=myfile.xls");
> Response.WriteFile("myfile.xls");
>
> Here's more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwebhttpresponseclasswritefiletopic.asp
http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309so_l/asp200309so
_l.asp
> --
> I hope this helps,
[quoted text clipped - 11 lines]
> >
> > Ali
http://support.microsoft.com/default.aspx?scid=kb;en-us;318756&Product=aspne
> > t
> >
[quoted text clipped - 10 lines]
> > > You are missing the ContentType setting.
> > > Response.ContentType = "application/vnd.ms-excel"
http://support.microsoft.com/default.aspx?scid=kb;en-us;318756&Product=aspne
> > t
> > >
[quoted text clipped - 5 lines]
> > > Carl Prothman
> > > Microsoft ASP.NET MVP