User-707554951 posted
Hi NAF
You full path stored in database should be as below:
..\Images\Capture2.PNG
Note: Capture.PNG stored in Images folder
Working code as below:
<asp:DataList ID="dlCustomers" runat="server" RepeatColumns="3" CellSpacing="3" RepeatLayout="Table">
<ItemTemplate>
<table class="table">
<tr>
<th colspan="2">
<b><%# Eval("Name") %></b>
</th>
</tr>
<tr>
<td colspan="2">
<asp:HyperLink ID="HyperLink1" CssClass="list-group-item" runat="server" NavigateUrl='<%#Eval("FullPath") %>'
Text='<%# Bind("Name") %>' Target="ccmdemo"></asp:HyperLink>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
CodeBehind:
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[] { new DataColumn("Name"), new DataColumn("FullPath") });
dt.Rows.Add("Name1", @"..\Images\Capture2.PNG");
//following code not work for you
dt.Rows.Add("Name2", @"C:\Users\v-guzou\Documents\Visual Studio 2015\Projects\CaseTest\CaseTest\Images\Capture2.PNG");
dt.Rows.Add("Name3", @"C:\Users\v-guzou\Documents\Visual Studio 2015\Projects\CaseTest\CaseTest\Images");
dt.Rows.Add("Name4", @"C:\Users\v-guzou\Documents\Visual Studio 2015\Projects\CaseTest\CaseTest\Images");
dlCustomers.DataSource = dt;
dlCustomers.DataBind();
}
Output:

Best regards
Cathy