ASP.NET Eval Server tag is not well formed

Posted on 2011-09-09
Medium Priority
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.
Question by:conrad2010
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

Expert Comment

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

You don't want quotes around the Eval portion.

Accepted Solution

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!

Expert Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 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