Posto la soluzione che ho trovato da me(quindi suscettibile di miglioramenti) nel caso potesse servire a qualcuno:
codice:
Sub R1_ItemCommand(ByVal Sender As Object, ByVal e As RepeaterCommandEventArgs)
If e.CommandName = "redirect" Then
Response.Redirect("InserisciNelCarrello.aspx?idprodotto=" & e.CommandArgument & "&quant=" & CType(e.Item.FindControl("quant"), TextBox).Text)
End If
End Sub
Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) ' Handles Repeater1.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.EditItem Then
Dim bottone As Button = CType(e.Item.FindControl("button2"), Button)
bottone.CommandArgument = DataBinder.Eval(e.Item.DataItem, "idprodotto")
End If
End Sub
codice:
<asp:Repeater id="Repeater1" OnItemCommand="R1_ItemCommand" OnItemDataBound ="Repeater1_ItemDataBound" runat="server">
<asp:Button ID="Button2" Text="Inserisci" CommandName="redirect" runat="server" />
il tutto con AutoEventWireup="True"
Spero di non aver dimenticato nulla.