Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Quotes in Command Argument binding expression

Reply
Thread Tools

Quotes in Command Argument binding expression

 
 
Harlan Messinger
Guest
Posts: n/a
 
      08-29-2006
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?
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      08-29-2006

Use

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

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


"Harlan Messinger" <> wrote in message
news:...
> 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?



 
Reply With Quote
 
 
 
 
Harlan Messinger
Guest
Posts: n/a
 
      08-29-2006
Eliyahu Goldin wrote:
> Use
>
> CommandArgument='<%# DataBinder.Eval(Container.DataItem, "OrderID") %>'
>


Well, that was simple enough. Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regex to avoid escaped quotes or double quotes jOhn Ruby 1 01-29-2008 08:31 PM
PHP double quotes inside double quotes MSB Computer Support 11 10-21-2006 01:09 PM
Asp.NET Javascript string, want to pass '(single quotes' within '(single quotes) Chris ASP .Net 1 03-24-2006 09:03 PM
Quotes/Double Quotes in Image Control Chris White ASP .Net 1 09-22-2004 06:22 AM
Multiline quotes - escaping quotes - et al Lawrence Tierney Java 3 12-24-2003 05:12 PM



Advertisments