Issue in displaying images (jpg, gif, etc) in a GridView, using the image path saved in a MSSQL database table.
Sample code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" >
<Columns>
<asp:ImageField DataImageUrlField="imageUrl"> </asp:ImageField>
<asp:BoundField DataField="description" HeaderText="Description"/>
</Columns>
</asp:GridView>
Used DNN's standard methods to DataBind the GridVIew. The locations (e.g, ~\image\myCat.gif) of the images are in the column, ImageUrl.
This works perfectly in a normal ASP.net (3.5) application. But the same code is not working when used in a DNN Module. Also tried the full path of image, instead of relative one shown above, without any success.
So what’s the modification for this code to get it to work in DNN module? Or is there any better way to do this in DNN? (I want to avoid storing images in binary format in the database, since it causes loss of image quality.) Any suggestions/help, greatly appreciated!
A purpose of this would be, to have the users upload their pictures to a folder, with some description of the image, which later can be retrieved and displayed.
Thanks!