Solved

ASP.NET NavigateURL using Eval for multiple parameters

Posted on 2011-03-08
4
2,067 Views
Last Modified: 2012-05-11
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
Comment
Question by:saturation
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:agarwalrahul
ID: 35077547
Use this code:

NavigateUrl='<%# string.format("page.aspx?val={0}", Eval("val")) %>'
0
 
LVL 12

Expert Comment

by:Kaushal Arora
ID: 35079170
You can also use this:

NavigateUrl = '<%# "Loan.aspx?ProductID=" + Eval("P_ID").ToString() %>'
0
 
LVL 9

Accepted Solution

by:
gery128 earned 500 total points
ID: 35080666
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
 
LVL 9

Expert Comment

by:gery128
ID: 35082023
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question