Solved

Eval Hyperlink

Posted on 2009-04-06
7
561 Views
Last Modified: 2013-11-26
Can someone tell me why this isn't working?

<a href="resortDetail.aspx?id='<%# Eval("ResortID") %>'"
0
Comment
Question by:lrbrister
7 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 24081074
Where is ResortID supposed to be coming from?
0
 
LVL 27

Expert Comment

by:nmarun
ID: 24081143
That's right. Can you please post the entire code.. both aspx and the code-behind?
0
 
LVL 16

Expert Comment

by:burakiewicz
ID: 24081159
try this
<a href='<%#= "resortDetail.aspx?id=" + Eval("ResortID") %>' ></a>
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 10

Expert Comment

by:Espavo
ID: 24081160
Have you tried:
<a href='<%# "resortDetail.aspx?id=" & Eval("ResortID") %>'>  
or
<a href='<%= "resortDetail.aspx?id=" & Eval("ResortID") %>'>  
(I always get confused about the = / #... ;-) )
0
 
LVL 13

Expert Comment

by:sm394
ID: 24081169
also post what error msg you getting
0
 

Accepted Solution

by:
lrbrister earned 0 total points
ID: 24081170
Hey guys...
I made a basic meathead move...
The code above works...I had the wrong destination page referenced.  All I had to do also...was remove single quotes.

Here's final version...
<a href="resortDetail2.aspx?id=<%#Eval("ResortID")%>" class="galleryResortLink">View Details</a>

Should I split points pr request the issue be closed without objection?
0
 
LVL 27

Expert Comment

by:nmarun
ID: 24081209
Since you found out the solution yourself, you can assign points to your post and mark this issue for PAQ.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
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 …

679 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