I have this frustrating problem....I have a user control/custom repeater that I originally wrote in .NET 1.1 Im now trying to port it into Community Server 2007 and ASP.NET 2. The ItemDatabound event is firing but for some reason the postbacks are never hitting the ItemCommand event handler....the postback is happening but Im not getting to the event handler<asp:repeater id="rptProducts" runat="server"> <itemtemplate> <div class="product"> <h2 class="CommonTitle"><%# DataBinder.Eval(Container.DataItem, "Name" %></h2> <div class="price"> <div class="amount"> <span class="currency">$</span><%# DataBinder.Eval(Container.DataItem, "Price" %> </div> <asp:imagebutton id="imgbtnAddToCart" commandargument='<%# DataBinder.Eval(Container.DataItem, "id" %>' cssclass="button" imageurl="AddToCart.jpg" runat="server" /> </div> <asp:label id="lblDescription" runat="server"> <p class="description"><%# DataBinder.Eval(Container.DataItem, "Description" %></p> </asp:label> </div> </itemtemplate></asp:repeater> private void InitializeComponent(){ this.Load += new System.EventHandler(this.Page_Load); this.rptProducts.ItemDataBound += new RepeaterItemEventHandler(rptProducts_ItemDataBound); this.rptProducts.ItemCommand += new RepeaterCommandEventHandler(rptProducts_ItemCommand); }
private void rptProducts_ItemCommand(object source, RepeaterCommandEventArgs e) { ImageButton btnSource = (ImageButton)e.CommandSource;....................
Keith,
Did you manage to solve this issue? I've got the exact same problem and I can't find a solution for it.
Cheers!Rutger
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com