2
votes

What type of post back occurs when I create a repeater and put a button inside of it with the CommandArgument and CommandName properties set?

I'm needing to mimic this call to the server so I can have my own custom postback and end up within the ItemCommand event of the repeater.

<asp:Repeater ID="repeaterTest" runat="server">
  <ItemTemplate>
    <tr onclick="DO A SPECIAL POSTBACK">
     ...
    </tr>
  </ItemTemplate>
</asp:Repeater>
3

3 Answers

3
votes

You'll want to try and emulate the appropriate __doPostBack call. There are quite a few ways to achieve this so have a google around here is a good start http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcongeneratingclient-sidejavascriptforpostback.asp

0
votes

In the repeater you should treat the OnItemCommand event. In the event you'll get the source and the command argument. But in your case, as it's not a control but a , you should do manually a __dopostback.

0
votes

I did something similar in GridView and had some problems with initiating the __doPostBack, look at jquery dialog and asp.net dynamic linkbutton

you might also want to see JQuery DIalog and ASP.NET Repeater