Dhimesh Parmar

Dhimesh Parmar

  • NA
  • 126
  • 14.4k

I need help for bind html table using datatable?

Feb 27 2018 12:38 AM
Without using Asp.net control
<table border="1" id="TableUser" runat="server">
<tr>
<th>Main Action</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>Action</th>
</tr>
<%
if (dt != null && dt.rows.count>0)
{
foreach (var item in dt.rows)
{
%>
<tr>
<td>
<asp:LinkButton ID="LinlEdit" runat="server" Text="Edit"/>
&nbsp;|
<asp:LinkButton ID="LinkDelete" runat="server" Text="Delete"/>
</td>
<td><%# Eval("name") %></td>
<td><%# Eval("emailid") %></td>
<td><%# Eval("mobilenumber") %></td>
<td>
<asp:LinkButton ID="LinkAction" runat="server" Text="Enable"/>
</td>
</tr>
<%
}
}
%>
 

Answers (3)