Ok, what you are after is binding a table rather than binding to the table.
No, an html table doesn't support DataSource. Instead you can do something
like
<table>
<asp:repeater ... DataSource= ...>
<asp:ItemTemplate>
<tr><td><%# DataBinder.Eval(Container.DataItem, "property")%></td></tr>
</asp:ItemTemplate>
</asp:repeater>
</table>
Eliyahu
"Jaybuffet" <Ja*******@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I was hoping to bind to the table, ie. <table DataSource=<%# myobj %> then
use <td><%# DataBinder.Eval(Container.DataItem, "property")%>td>
Creating protected properties in the code behind for each property in my
object may be a hassle, but its an option. Perhaps I am missing
something.
Just wondering if there is another way.
Thanks for your reply
"Eliyahu Goldin" wrote:
In the code-behind make a protected property that will go to the table
and
derive the value you want to bind to. Bind to the property like this:
<td><%# SalesTotal %></td>
where SalesTotal is a protected property in the code-behind.
Eliyahu
"Jaybuffet" <Ja*******@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com... >a custom object. Similar to how I bind a collection of objects to a
> repeater. Is there a way to bind a single object to a Table? I could
> use
> a
> repeater, but seems over kill for a single object.
>
> Thanks for any help.