Solved

ASP.NET Eval Server tag is not well formed

Posted on 2011-09-09
3
596 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
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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 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

13 Experts available now in Live!

Get 1:1 Help Now