When trying to build the solution, I am getting a warning, Attribute must be enclosed in quotation marks. How do I enclose the CommandArgument attribute in quotes ?
<asp:LinkButton Runat="server" ID="lkAcknowledge" Visible="false" CommandName="Acknowledge" CommandArgument=<%# DataBinder.Eval(Container.DataItem, "AssignmentID")%> >Acknowledge</asp:LinkButton>
Use single quotes:
<asp:LinkButton Runat="server" ID="lkAcknowledge" Visible="false" CommandName="Acknowledge" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "AssignmentID")%>'>Acknowledge</asp:LinkButton>
Use single quotes:
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "AssignmentID")%>'
Note you can also use the shorthand Eval
since ASP.NET 2.0 to get rid of some of the noise:
CommandArgument='<%#Eval("AssignmentID")%>'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With