Solved

Eval Hyperlink

Posted on 2009-04-06
7
564 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
[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
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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