Solved

ASP.NET Eval Server tag is not well formed

Posted on 2011-09-09
3
591 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
  • 3
3 Comments
 
LVL 4

Expert Comment

by:Friman001
Comment Utility
<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 500 total points
Comment Utility
<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
Comment Utility
When you have quotes within quotes, you want to make the outside ones single quotes.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now