How to bind multiple data items to single control

N

Nick

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
 

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,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top