Image not showing in Listview from Visual Studio asp.net database
I am completely new to Visual Studio and .net. So I am trying to get the image to display from the connected database. I have all the info showing just not the image. Here is the code you need to see if anyone can fix the error. This is probably something simple, but as I said, I'm new to all of this.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString='<%$ ConnectionStrings:photochunkConnectionString %>' SelectCommand="SELECT [PhotoName], [Details], [Image], [UploadDate], [PhotoTypeID] FROM [Photos] ORDER BY [UploadDate]"></asp:SqlDataSource>
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
<AlternatingItemTemplate>
<span style="">PhotoName:
<asp:Label Text='<%# Eval("PhotoName") %>' runat="server" ID="PhotoNameLabel" /><br />
Details:
<asp:Label Text='<%# Eval("Details") %>' runat="server" ID="DetailsLabel" /><br />
Image:
<asp:Image ImageURL='<%# Eval("Image") %>' runat="server" ID="ImageLabel" Width="200px" /><br />
UploadDate:
<asp:Label Text='<%# Eval("UploadDate") %>' runat="server" ID="UploadDateLabel" /><br />
PhotoTypeID:
<asp:Label Text='<%# Eval("PhotoTypeID") %>' runat="server" ID="PhotoTypeIDLabel" /><br />
<br />
</span>
</AlternatingItemTemplate>
0
source to share
No one has answered this question yet
See similar questions:
or similar: