Solved

ASP.NET NavigateURL using Eval for multiple parameters

Posted on 2011-03-08
4
1,989 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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