如何在数据库中显示gridview中的图像
问题描述:
大家好
我的代码是
hi all
my code is
<asp:TemplateField HeaderText="Image">
<ItemTemplate>
<asp:Image ID="imgproduct" ImageUrl='<%#Eval("image")%>' runat="server" Width="30" Height="30" />
</ItemTemplate>
</asp:TemplateField>
cs code
cs code
string Qry = "select id,product,description,image from ProductAdd ";
grdaddproduct.DataSource = adpro.GetData(Qry);
grdaddproduct.DataBind();
这里的adpo.getdata是方法
感谢
Here adpo.getdata is method
Thanks
答
图像路径中的问题。检查路径是否正确。你的代码是正确的。
problem in image path. check whether path is correct. your code is correct.