How to bind multiple data items to single control

Discussion in 'ASP .Net' started by Nick, Mar 1, 2006.

  1. Nick

    Nick Guest

    Hi,

    I have a Repeater control and want to bind a hyperlink to each repeated
    row. For this I can use the following syntax (excuse any incorrect
    naming but I don't have any code to hand):

    <asp:Hyperlink id="x" NavigateToUrl='<%# Bind("id", "Page.aspc?id={0}")
    %> Text="Text"></asp:Hyperlink>

    This all works find but I'd like to be able to bind 2 data items such
    as this:

    <asp:Hyperlink id="x" NavigateToUrl='<%# Bind("id, name",
    "Page.aspc?id={0}&name={1}") %> Text="Text"></asp:Hyperlink>

    Obviously this doesn't work, but is there another way to do this?

    Thanks

    Nick
     
    Nick, Mar 1, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mr2_93
    Replies:
    1
    Views:
    3,625
    mr2_93
    Oct 2, 2005
  2. Daves
    Replies:
    1
    Views:
    642
    S. Justin Gengo
    Jan 6, 2006
  3. Replies:
    0
    Views:
    598
  4. dan
    Replies:
    0
    Views:
    603
  5. ela
    Replies:
    12
    Views:
    363
    Uri Guttman
    Apr 6, 2009
Loading...

Share This Page