I'm modifying a demo example from
http://www.dotlucene.net/download/Do...chDemo-1.1.zip
I'm trying to make the paging using a repeater control
by now Im testing the demo inseting a LinkButton in the repeater
<P><asp:repeater id=Repeater1 runat="server" DataSource="<%# Results %>" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<p><a href='<%# DataBinder.Eval(Container.DataItem, "path") %>' class="link"><%# DataBinder.Eval(Container.DataItem, "title") %></a><br>
<span class="sample">
<%# DataBinder.Eval(Container.DataItem, "sample") %>
</span>
<br>
<span class="path">
<%# DataBinder.Eval(Container.DataItem, "path") %>
</span>
</p>
<asp:LinkButton id="LinkButton1" runat="server" CommandName="ShowIt" CommandArgument="123" EnableViewState=True Enabled="true"><%# DataBinder.Eval(Container.DataItem, "title") %></asp:LinkButton>
</ItemTemplate>
</asp:repeater>
</P>
on the code behind:
protected void Repeater1_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
{
Response.Write("Hola Mundo");
}
but the program never go to thise method
I found the following link
http://weblogs.asp.net/jgalloway/arc.../07/30924.aspx
but the options presented there dont work
I foun another example on
http://msdn.microsoft.com/library/de...mmandtopic.asp
Note that in this example they have
AutoEventWireup="True" on the page statement
finally i found the folloing note on
http://msdn.microsoft.com/library/de...rdcontrols.asp
Note If you call the DataBind method of the parent control (the DataList, Repeater, or DataGrid control), the ItemCommand event is not raised, because the contents of the parent control are reset. Therefore, you generally do not want to call the DataBind method on each round trip (that is, in the page initialization without checking for a post back). For details, see Data Binding Multi-Record Web Server Controls and Data Binding Single-Value Web Server Controls at Design Time.
I wonder if somebody else have the same/similar problem?