Sir I want to make DataList clickable so that if I click on image I will show some Image or relevant information regarding same Item/Image via popup or Redirect to another page with Unique id
Please suggest how can i make it clickable and open popup with unique ID
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<asp:DataList ID="DataList1" CssClass="table table-responsive" runat="server" RepeatColumns="4" CellSpacing="0" RepeatLayout="Table">
<ItemTemplate>
<table class="dlTable">
<tr>
<th colspan="2">
<b>
<%# Eval("Name") %></b>
</th>
</tr>
<tr>
<td>
<img id="Image1" height="75px" width="75px" style ="cursor:pointer" src='<%# "data:image/jpg;base64," + Convert.ToBase64String((byte[])Eval("Data")) %>' />
</td>
</tr>
<tr>
<td colspan="2">
<%# Eval("id") %>,
<%# Eval("ContentType") %>
</td>
</tr>
<tr>
<td colspan="2">
Name:
<%# Eval("Name")%>
</td>
</tr>
<tr>
<td colspan="2">
ContentType:
<%# Eval("ContentType")%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
private DataTable GetData()
{
string conString = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
using (SqlConnection con = new SqlConnection(conString))
{
using (SqlCommand cmd = new SqlCommand("SELECT id, Name, ContentType,Data from tblFiles"))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.Connection = con;
sda.SelectCommand = cmd;
using (DataTable dt = new DataTable())
{
sda.Fill(dt);
return dt;
}
}
}
}
}