• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2417
  • Last Modified:

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}") %>'
0
saturation
Asked:
saturation
  • 2
1 Solution
 
Rahul AgarwalTeam LeaderCommented:
Use this code:

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

NavigateUrl = '<%# "Loan.aspx?ProductID=" + Eval("P_ID").ToString() %>'
0
 
gery128Commented:
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")%>'
0
 
gery128Commented:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now