i want to add rating control for articles but i am not sure where to add rating changed event in repeater control below is my code please help me
<asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="Title articleLink">
<a href="Article.aspx?id=<%# Eval("ArticleId") %> &Caterory=<%# Eval("Category") %>">
<%# Eval("Title") %></a>
</td>
</tr>
<tr>
<td>
<%# Eval("Details") %>
</td>
</tr>
<tr>
<td class="name">
<%# Eval("AuthorName")%>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnLike" runat="server" Text="Like" CommandName="Like" CssClass="button" />
<asp:Button ID="btnComment" runat="server" Text="Comment" CommandName="Comment" CssClass="button" />
<asp:Button ID="btnShare" runat="server" Text="Share" CommandName="Share" CssClass="button" />
<asp:Label ID="lblPostDate" runat="server"><%# Eval("PostDate")%></asp:Label>
<br />
<asp:Panel ID="Panel1" Visible="false" runat="server">
<table>
<tr>
<td style="vertical-align: top">
Commnents :
</td>
<td>
<asp:TextBox ID="txtcomments" runat="server" Height="194px" Width="428px" MaxLength="500"
TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" CssClass="NormalButton" Text="Comment" />
<asp:Button ID="btncancel" runat="server" CssClass="NormalButton" Text="Cancel" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Rating ID="Rating1" runat="server" EmptyStarCssClass="ratingEmpty" MaxRating="5"
FilledStarCssClass="ratingFilled" AutoPostBack="true" StarCssClass="ratingEmpty"
WaitingStarCssClass="ratingSaved" OnChanged="Rating1_Changed">
</asp:Rating>
</td>
</tr>
</table>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
protected void Rating1_Changed(object sender, AjaxControlToolkit.RatingEventArgs e)
{
SqlDataReader mdr;
mdr = (SqlDataReader)objGetArticles.AddRatingToArticle(Request.QueryString["id"].ToString(), Session["Pk_MemId"].ToString(), Rating1.CurrentRating, 2);
while (mdr.Read())
{
Rating1.CurrentRating = Convert.ToInt16(mdr["Rating"]);
}
mdr.Close();
Rating1.ReadOnly = true;
}