Use Template column to display image. Bind the datasource to datagrid through Dataset (filled with databased values including path from database) %26amp; type below code in
HTML source
Here is the code
%26lt;asp:Datagrid id=';dgImage'; runat=server AutoGenerateColumns=false%26gt;
%26lt;Columns%26gt;
%26lt;asp:templatecolumn HeaderText=';Image';%26gt; %26lt;ItemTemplate%26gt; %26lt;img
src='%26lt;%# DataBinder.Eval(Container, ';DataItem.ImgPath';) %%26gt;'
/%26gt; %26lt;/ItemTemplate%26gt;
%26lt;/asp:templatecolumn%26gt;
%26lt;/Columns%26gt;
%26lt;/asp:DataGrid%26gt;
No comments:
Post a Comment