Hi,

I am displaying a dataset using a ListView and want to add a LinkButton next to each item with the command argument being the id of the relevant link.

In vbscript I would have simply used something like CommandArgument="<=recordset("linkid")%>" but trying something similar gives me a "server tag not well formed error"... Please can anyone point me in the right direction as I can imagine wanting to use this a lot! Any sample code most appreciated!! Code sample below.

Thanks!
Regards,
Alex.

<asp:ListView ID="ListView1" runat="server"
DataSourceID="ObjectDataSource1">
<LayoutTemplate>
<div id="homepagescroller">
<table>
<thead>
<tr>
<td>
</td>
<td>
</td>
</tr>
</thead>
<tbody>
<asp:PlaceHolder ID="itemplaceholder" runat="server" />
</tbody>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<a href="<%# Eval("linkurl") %>" target="_parent"><%# Eval("linkname") %></a>
<asp:LinkButton ID="LinkButtontest"
Text="(delete)"
CommandName="delete"
CommandArgument="<%# Eval("linkid") %>"
OnCommand="LinkButton_Command"
runat="server"/>
</td>
</tr>
</ItemTemplate>
</asp:ListView>