Repeater ItemCommand event not firing

I want when the user clicks on the \[code\]Panel\[/code\] that's having class \[code\]session_box\[/code\] a click event fire. But when i click on it, nothing happen. When i debugged the code, the \[code\]ItemCommand\[/code\] event doesn't even get called !Here's my code :HTML:\[code\]<div id="sessions_wrapper"> <asp:Repeater ID="sessions_repeater" runat="server" DataSourceID="SqlDataSource1" onitemcommand="sessions_repeater_ItemCommand"> <ItemTemplate> <asp:Panel CssClass="session_box" runat="server" data-session-id='<%# Eval("session_id") %>'> <asp:Image CssClass="session_icon" runat="server" ImageUrl='<%# Eval("session_cover") %>' alt="" /> <div class="session_info"> <p>Title: <%# Eval("session_name") %></p> <p>Date: <%# Eval("session_date") %></p> <p>Photos: <%# Eval("session_photos") %></p> </div> </asp:Panel> </ItemTemplate> </asp:Repeater> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBCS %>" ProviderName="<%$ ConnectionStrings:DBCS.ProviderName %>" SelectCommand="SELECT * FROM [sessions]"></asp:SqlDataSource></div>\[/code\]C# : \[code\]protected void sessions_repeater_ItemCommand(object source, RepeaterCommandEventArgs e){ string sid = ((Panel)e.CommandSource).Attributes["data-session-id"]; Response.Redirect("sessions.aspx?sid=" + sid);}\[/code\]
 
Back
Top