Export datagrid to Excel

D

dana lees

Hello,

I am developing a c# asp.net application.

I am trying to export a datagrid to excel by using:

Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "inline;");
Response.Charset = "";

It works great on some computers, but on other computers it opens the excel
sheet with the login page inside (my login page with a textbox for username
and a textbox for password). I have checked the security settings of the
browser on both computers (where it works and doesn't work) and they are
exactly the same. The browser version is also exactly the same.

Any ideas what could be the problem?

Thanks...
 

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

Similar Threads


Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top