Edit:
After some research here on SO, I found that others events than ItemCommand
are not caught by Asp:Repeater
, as FlySwat said on his answer. So you'll need to write your VB.NET
code like this:
First, declare the ItemCommand
event on your page with something like this:
Protected Sub rpt_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rpt.ItemCommand
If e.CommandName = "Save" Then
'Save
End If
End Sub
Then, on Asp:Button
markup inside the Asp:Repeater
, you must set its CommandName
property like this:
<Asp:Button ID="btnSave" runat="server" CommandName="Save" UseSubmitBehavior="false"/>
Take a look here to learn more about the UseSubmitBehavior
.
Try it.