Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP.NET Eval Server tag is not well formed

Posted on 2011-09-09
3
Medium Priority
?
616 Views
Last Modified: 2012-05-12

what's wrong with this?

<asp:HyperLink ID="relatedLink" NavigateUrl="<%#  Eval("RelatedProjectID") %>" runat="server">

Getting this error: Parser Error Message: The server tag is not well formed.
0
Comment
Question by:conrad2010
[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
  • 3
3 Comments
 
LVL 4

Expert Comment

by:Friman001
ID: 36512575
<asp:HyperLink ID="relatedLink" NavigateUrl="~/Test/Default.aspx?JobId="<%#  Eval("RelatedProjectID") %> runat="server">

You don't want quotes around the Eval portion.
0
 
LVL 4

Accepted Solution

by:
Friman001 earned 2000 total points
ID: 36512589
<asp:HyperLink ID="relatedLink" NavigateUrl='<%#  Eval("RelatedProjectID") %>' runat="server">

Sorry, I was thinking wrong!!!  You want single quotes!
0
 
LVL 4

Expert Comment

by:Friman001
ID: 36512614
When you have quotes within quotes, you want to make the outside ones single quotes.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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