How to use Eval or Bind with 2 values

D

Donald Adams

How can I use Eval or Bind with 2 values? The following does not work:

<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='Workitem.aspx?ID=<%# Eval("ID", "{0}") %>&WID=<%# Eval("PIID",
"{0}") %>' ImageUrl="~/Images/iSelect.gif"></asp:HyperLink>

Thanks in advance,
Donald
 
A

Ankit Aneja

<asp:HyperLink id="Hyperlink1" Runat="server"
NavigateUrl='<%#"/admin/managenews.aspx?action=2&id="+DataBinder.Eval(Container.DataItem,"NID")+"&cid="+DataBinder.Eval(Container.DataItem,"NID")
%>' ImageUrl="/images/right.png">
</asp:HyperLink>

this may help u
 

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,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top