<asp:LinkButton ID="LinkButton1" runat="server" Text="edit item" onclick='AddItem.aspx?catid=<%# Eval("CollectionID")%>' />
I removed the extraneous quotes around the attribute value for OnClick .
However, OnClick expects a delegate, not a URL. Either use the hyperlink or switch to the event handler.
<a href='AddItem.aspx?catid=<%# Eval("CollectionID")%>'>edit item</a>
This article shows how to pass an argument to an event handler from a link button. Instead of using OnClick you can use OnCommand and set the CommandArgument property.
In the markup
<asp:LinkButton id="lnkEdit" Text="Edit Item" CommandArgument='<%# Eval("CollectionID")%>' OnCommand="lnkEdit_Command" runat="server"/>
In Codebehind
protected void lnkEdit_Command( object sender, CommandEventArgs e ) {
I prefer to use the URL against the command's event handler whenever possible, as it eliminates the relatively expensive postback.
source share