tags:

views:

504

answers:

1

I have designed one web page in asp.net. In that i have used the css file and excel generation button. While i am cliking the button for populating the data from database to excel. It is showing the problem in uploading the css file like that .What will i do the for removing the that error.

For opening the excel sheet I have used the following code that is

Response.ContentType = "application/xls";
Response.AddHeader("Content-Disposition", "attachment; filename=itext.xls");

Is there anything wrong in this?

+1  A: 

If I understood correctly, the problem you're having is one I had a long time ago (still in the classic ASP days) where you get an error "missing file" pointing to the css reference when you open the excel file you generated. The workaround I've done at the time was to remove the css reference completely and use inline styles instead.

That will allow you to go home, but if you want a more evolved solution you could make an async request to the server, generate the content there (either in-memory or in a file, depending how big the result is) and then send it back to the client when it's done.

rodbv