Search code examples
asp.netrepeateritemcommand

how to make that click on div fire onitemcommand event


My repeater code looks like below,

<asp:Repeater ID="rep_test" runat="server" onitemcommand="rep_test_ItemCommand">
<ItemTemplate>
<div runat="server" CommandName="abc" CommandArgument='123'>
</div>

What I want is, when I click on div it should fire onitemcommand event,

Is it possible?


Solution

  • The only way you can do it to add a javascript and a link button. On click of a div click that link button.

    You can follow the example in the following link

    http://forums.asp.net/t/1379603.aspx