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/”/&gt;

CodeBind :

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

Advertisements