Attribute values must be enclosed in quotation marks

Hi!
Im following the book “Build your owain ASP.net 2.0 Website using C# & VB” and I have hit a problem.
I am getting the error message:

Validation (ASP.Net): Attribute values must be enclosed in quotation marks.

The lines pointing to is:
<td><asp:LinkButton ID=“editButton” runat=“server” Text=“Edit” CommandName=“editItem” CommandArgument=<%#Eval(“ID”)%> /></td>

And the bit VS2005 is pointing to is CommandArgument=<%#Eval(“ID”)%>

I can’t understand why its having issues.

Any help would be great.

Owain.


CommandArgument=<&#37;#Eval("ID")%>

Should be:


CommandArgument=[B]"[/B]<%#Eval("ID")%>[B]"[/B]

I am no expert on ASP but just a guess:

CommandArgument="<%#Eval("ID")%>"

Ye, thats what I thought but the book said otherwise :slight_smile:

Now Im getting a different error but I will try and work it out myself before posting a thread about it :slight_smile:

Cheers,

O.

If you need help by all means post a question. There are a ton of people here trying to avoid doing any actual work while answering questions others have. :slight_smile:

lol, thanks.
I just like to try and figure it out myself first and then if require post a question. Just don’t want to be constantly looking for people to fix my mistakes :slight_smile:

It doesnt help Im trying to learn .ASP C# at work and build my own PHP stuff at home :slight_smile:

O.