ASP Repeater item command doesn't work

uveX

New Member
i'm working on asp repeater control which have one or more link button, the problem isthe item command never fired when i click the link button !i spent the last 2 days searching about solution but i got nothing !\[code\] <asp:Repeater ID="rptTweets" runat="server" onitemcommand="rptTweets_ItemCommand"> <HeaderTemplate> <ul> </HeaderTemplate> <ItemTemplate> <li> <div class="imgb"> <img src="http://stackoverflow.com/questions/15860668/<%# Eval("userImg") %>" width="35" height="35" alt="Comment" /> </div> <asp:TextBox ID="txtTweet" runat="server" TextMode="MultiLine" Rows="5" Columns="5" EnableViewState="true" Text='<%# Eval("tweet")%>' > </asp:TextBox> <div class="edit"> <asp:LinkButton ID="btnView" runat="server" CommandName="View" CommandArgument='<%# Eval("tweet")%>' CssClass="comment-edit">View</asp:LinkButton> </div> </li> </ItemTemplate> <FooterTemplate> </ul> </FooterTemplate></asp:Repeater>\[/code\]and here is the binding :\[code\]if (!IsPostBack){ List<clsTweet> tw = getTweets(); rptTweets.DataSource = tw; rptTweets.DataBind();}\[/code\]and this my item command function:\[code\]protected void rptTweets_ItemCommand(object source, RepeaterCommandEventArgs e){ lblMsg.Text = "Working................................??";}\[/code\]
 
Back
Top