Quotes in Command Argument binding expression

H

Harlan Messinger

In VS2003, inside of a template column, I put a LinkButton with the
following attribute:

CommandArgument="<%# DataBinder.Eval(Container.DataItem, "OrderID") %>"

ASP.NET produced the following error message in the browser:

Parser Error Message: The server tag is not well formed.

If I put a public variable in my page:

public string Hello = "OrderID";

and change the attribute to:

CommandArgument="<%# DataBinder.Eval(Container.DataItem, Hello) %>"

then all is well.

What are the details of ASPX processing that result in these double
quotes causing a parsing error?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top