About ItemTemplate problem

A

Alan Ho

I would like to know how to change the "Item" to other name...

e.g. in HTML Code
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Item") %>
</ItemTemplate>

I wanna to change the "Item" to "Name" , after i press asp:Button in
webfrom.....

how can i do that?

Thanks
 
T

Teemu Keiski

You can to do that in code by having a Label where you now have the
databinding expression. In ItemdataBound event, set the text to the label
from the data source field that you look for (pressing the button can change
a flag variable on page, which the logic in ItemdataBound uses to determine
which filed to look for).
 

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
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top