Assigning Datasource to a region
- by minal
Hi,
I was wondering if there is an existing control that I could use to achieve what I am trying.
Basically, I have a html table that I display my header information.
It looks something like this:
<table class="tableEdit">
<tr>
<th>Job ID</th><td>10</td>
<th>Client</th><td>Tom</td>
</tr>
<tr>
<th>Comments</th><td>Comments are here</td>
</tr>
</table>
I am wondering if there is an existing control that I can use as a container. Then I can assign the datasource to that control
and leverage the field values as such.
<asp:Somecontrol runat="server" ID="someid">
<table class="tableEdit">
<tr>
<th>Job ID</th><td><%# Eval("Id") %></td>
<th>Client</th><td><%# Eval("Client.Name") %></td>
</tr>
<tr>
<th>Comments</th><td><%# Eval("Comments") %></td>
</tr>
</table>
</asp:Somecontrol>
private void BindHeader()
{
SomeObjectType data = DAL.SomeMethod();
someid.Datasource = data;
someid.DataBind();
}
Is there anything out there to do this? I want to be able to control the layout of the fields within the container.
Thanks.