Author: roydehaan | Posted on: 8/13/2009 8:17:56 AM | Views : 804

Hello there, 
I'm trying to raise a onitemcommand in a listview. When I use a sqldatasource control I have no problem firing the itemcommand. However when databinding my dataset using the codebehind there is a postback but the onitemcommand is not fired. Please se code below.
Example from Microsoft that is working with a sqldatasource http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listview.itemcommand.aspx
======= .aspx page ======================
<asp:ListView ID="ListView2" runat="server" OnItemCommand="ListView2_ItemCommand" DataKeyNames="ProductId" >
<ItemTemplate>
<asp:ImageButton ID="ImgBtn" runat="server" CommandName="Select" CommandArgument=' ...

Go to the complete details ...