Issue While exporting Gridview to Excel while deployment

Issue While exporting Gridview to Excel

 Issue    : Image is not showing in the Excel

 Solution : The URL must be

ImageUrl=”http://localhost:63360/Website/Images/help.gif” /> instead of ImageUrl=”~/help.gif”.

 So place URL in webcofig

<add key=”ImagePath” value=”http://localhost:63360/Website/Images/”/>

CodeBind :

imgStat.ImageUrl = ConfigurationSettings.AppSettings[“ImagePath”].ToString() + @”help.png”;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.