DataList Databinding Question...

S

Sal

Hello All,
Is it possible to databind Header Template for a datalist ?
for example for binding to an item template I can use the following
construct:
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ProductID") %>
</ItemTemplate>

In trying to databind the Header the following construct did not work:

<HeaderTemplate>

<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>

</HeaderTemplate>

Is there a way to accomplish this with one trip to the server? i.e. binding
both header and item to the same datasource and different fields?

Any help will be greatly appreciated

Sal Sarhangi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,416
Messages
2,571,560
Members
48,797
Latest member
shadowoftheunknown

Latest Threads

Top