The key to doing this is to look at the actual HTML that is being rendered, do your
style changes within it; and then bringing that back to your NET code.
As a precursor, format what you actually have in your code; using tabs or other fixed spacing. I have noticed a few errors in your template.
The first two appear in your
a
nchor (link) elements; the
href does not have a closing quote, and neither the tag opening or closing are terminated properly
<a href="details.aspx?id=
<%#Eval("id") %>"><%#Eval("Subject") %>
</a
The second problem I found is that within your template, you do not appear to be closing your
row div
<ItemTemplate>
<div class="row">
<div class="col-sm-6">
<table style="margin:auto;">
<tr>
<td style="margin:auto;width:100px;">
<img id="Image2" src='<%# Eval("imagename") %>' alt="hello" style="width:100px;" />
</td>
<td>
<a href="details.aspx?id=
<%#Eval("id") %>"><%#Eval("Subject") %>
</a
</td>
</tr>
</table>
</div>
</ItemTemplate>