About ItemTemplate problem

Discussion in 'ASP .Net' started by Alan Ho, Apr 11, 2005.

  1. Alan Ho

    Alan Ho Guest

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

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

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

    how can i do that?

    Alan Ho, Apr 11, 2005
    1. Advertisements

  2. Alan Ho

    Teemu Keiski Guest

    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).
    Teemu Keiski, Apr 11, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.