I have a quick question about this code from chapter 10. I get a warning message in the error window.
<asp:dataList id=“employeesList” runat=“server”
onitemcommand=“employeesList_ItemCommand”>
<ItemTemplate>
<asp:Literal ID=“extraDetailsLiteral” runat=“server”
EnableViewState=“false” />
Name: <strong><%#Eval(“Name”)%></strong><br />
Username: <strong><%#Eval(“Username”)%></strong><br />
<asp:LinkButton ID=“detailsButton” runat=“server”
Text=<%#"View more details about " + Eval(“Name”)%>
CommandName=“MoreDetailsPlease”
CommandArgument=<%#Eval(“EmployeeID”)%> />
<asp:LinkButton ID=“editButton” runat=“server”
Text=<%#"Edit employee " + Eval(“Name”)%>
CommandName=“EditItem”
CommandArgument=<%#Eval(“EmployeeID”)%> />
</ItemTemplate>
<EditItemTemplate>
Name: <asp:TextBox ID=“nameTextBox” runat=“server”
Text=<%#Eval(“Name”)%> /><br />
Username: <asp:TextBox ID=“usernameTextBox” runat=“server”
Text=<%#Eval(“Username”)%> /><br />
<asp:LinkButton ID=“updateButton” runat=“server”
Text=“Update Item” CommandName=“UpdateItem”
CommandArgument=<%#Eval(“EmployeeID”)%> />
or
<asp:LinkButton ID=“cancelButton” runat=“server”
Text=“Cancel Editing” CommandName=“CancelEditing”
CommandArgument=<%#Eval(“EmployeeID”)%> />
</EditItemTemplate>
The code in bold has a green squiggly line under it and I get the following warnings
“Validation (ASP:NET): Attribute values must be enclosed in quotation marks”
Now the code works just fine, but is this an example of a work around or non standard approach, or is it just that the debugger does not know how to handle this type of use?
also the “<asp:dataList id” in this code, the “D” in data is Capitalized but if I use : with a capital D in this post i get for exaple <asp:DataList id LOL