Take the 2-minute tour ×

I have a Gridview in my ASP.NET C# Page. It has a couple of columns and also one image column. I can export the entire columns to an Excel file, but the image column is blank. By the way, I use the full path.

Any Idea?

share|improve this question

2 Answers 2

Yes in default.aspx (For local Export)

instead of ImageUrl="~/banner.gif"

or (For remote Export)

http://your ip address here :port/foldername/filename
share|improve this answer

Response.Clear(); //this clears the Response of any headers or previous output Response.Buffer = true; //make sure that the entire output is rendered simultaneously

    Response.ContentType = "application/vnd.ms-excel";
    StringWriter stringWriter = new StringWriter(); //System.IO namespace should be used

    HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
    GridView2.GridLines = GridLines.Both;
share|improve this answer
This dosent help.... –  Luis Tellez Jun 7 '11 at 22:40

Your Answer

