# Response.ContentType for MS Excel



## e_deb_2002 (Mar 31, 2006)

Hi,

I am developing an Asp.Net application in VS2005.
It is running on Asp.Net Development Server provided with VS2005.

I am trying to download a page in MS Excel format. I have tried the following Response.ContentType values:

application/x-msexcel 
application/excel 
application/x-excel 
application/vnd.ms-excel 
application/msexcel
application/ms-excel

But the page is just displayed with no controls in it. and when I try to see the source, 

```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
```
is all that is there.

But there is a gridview that was to be there.

I can't identify where the problem is, whether it is because of the server on which I am running on, or the contenttype values.


----------

