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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top