<asp:DataList ID="dlCommentList" runat="server" Width="90%" OnItemDataBound="dlCommentList_ItemDataBound"
RepeatDirection="Vertical" DataKeyField="Id" HorizontalAlign="Center">
<ItemTemplate>
<asp:Button ID="btnShowrating" runat="server" Text="Rating" OnClick="btnShowrating_Click"
CommandArgument='<%# Eval("Id") %>' />
ItemTemplate>
asp:DataList>
protected void btnShowrating_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
DataListItem item = (DataListItem)btn.NamingContainer;
Panel panel = (Panel)dlCommentList.Items[item.ItemIndex].FindControl("panelRating");
0 comments:
Post a Comment