Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要把图片的地址存入数据库,我会在Datalist里面显示 如何在Datalist中显示图片?
考虑到带有图片路径的字段称为“Pic_Path”,将数据列表绑定到您的数据源,这里是 aspx 页面
<asp:DataList ID="DataList1" runat="server" > <ItemTemplate> <asp:Image ID="Image1" ID="Image1" ImageUrl='<%# Eval("Pic_Path") %>' runat="server" /> </ItemTemplate> </asp:DataList>