:master: sono da tanto che non lo uso, vedi se può andare
repeater:
codice:
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table border="1">
<tr>
<th>id</th>
<th>testo</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%#Eval("id")%>
</td>
<td>
<%#Eval("testo") %>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tr>
<td colspan="2">
<table border="0">
<tr>
<td>
<asp:LinkButton runat="server" ID="h_previous" CommandName="previous" Text="Pagina Precedente" />
</td>
<td>
<asp:LinkButton runat="server" ID="h_following" CommandName="following" Text="Pagina Seguente" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>
codice
codice:
Protected Sub Repeater1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles Repeater1.ItemCommand
'e.CommandSource è l'oggetto che scatena il postback
Dim o As Object = e.CommandSource()
If TypeOf o Is LinkButton Then 'sono interessato al linkbutton
Dim l As LinkButton = DirectCast(e.CommandSource, LinkButton)
PrintLn(l.ID) 'stampo id
PrintLn(l.CommandName) 'stampo CommandName
End If
End Sub