ASP.NET NavigateURL using Eval for multiple parameters

I need to somehow get the VersionID into the NavigateURL URL string ("V_ID"), but I have no idea how to put more than one ID into the Eval statement and then add it to the URL.   Can someone help?

<asp:HyperLink ID="lnkProductName" runat="server" NavigateUrl='<%# Eval("P_ID", "~/Loan.aspx?ProductID={0}") %>'
Who is Participating?
gery128Connect With a Mentor Commented:
so you are trying to pass more than one parameters in query string:

Did you try this:
NavigateUrl='<%#"Loan.aspx?ProductId=" + EVAL("P_ID") + "&VersionId= + EVAL("V_ID")%>'
Rahul AgarwalTeam LeaderCommented:
Use this code:

NavigateUrl='<%# string.format("page.aspx?val={0}", Eval("val")) %>'
Kaushal AroraTechnical AnalystCommented:
You can also use this:

NavigateUrl = '<%# "Loan.aspx?ProductID=" + Eval("P_ID").ToString() %>'
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.