How to refresh a single item inside Repeater control using updatepanel
<p>I'm making a social network website, the problem I'm facing here is that I used an update panel inside the repeater and I want to refresh the contents of the updatepanel when the user clicks on any linkbutton and ofcourse this updatepanel will be repeated foreach (div-post), but when I click on any linkbutton inside the repeater control and the updatepanel it doesn't refresh. How do I force it to refresh ?. Here is the code I'm using ... </p>

<pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
                    &lt;/asp:ScriptManager&gt;
                          &lt;asp:Repeater ID="Repeater1" runat="server" 
                                OnItemCommand="MyButtonCommandEvent"&gt;
                                &lt;ItemTemplate&gt;
                                &lt;asp:UpdatePanel ID="UpdatePanel3" runat="server"&gt;
                        &lt;ContentTemplate&gt;
                                    &lt;div class="post"&gt;
                                        &lt;asp:HiddenField ID="postID_hidden" runat="server" 
                                            Value='&lt;%# Eval("posts_ID") %&gt;' /&gt;
                                        &lt;div class="Thumb"&gt;
                                            &lt;img src="thumbs/abdo_thumb.jpg"&gt; &lt;/img&gt;&lt;/div&gt;
                                        &lt;span class="user"&gt;&lt;%#Eval("poster_name")%&gt;
                                        &lt;/span&gt;
                                        &lt;div class="post-body"&gt;
                                            &lt;p&gt;
                                                &lt;%#Eval("description")%&gt;
                                            &lt;/p&gt;
                                        &lt;/div&gt;
                                        &lt;div class="post-options" style=" height:22px; "&gt;
                                            &lt;span class="first"&gt;&lt;%#Eval("post_date")%&gt;&lt;/span&gt;
                                            &lt;ul style="display:inline; list-style-type: none;"&gt;
                                                &lt;li&gt;
                                                    &lt;div class="tooltip"&gt;
                                                        Comments
                                                        &lt;img class="tool-img" src="Images/comments.png"&gt; : &lt;%#Eval("comment_num") %&gt; 
                                                        &lt;/img&gt;
                                                    &lt;/div&gt;
                                                &lt;/li&gt;
                                                &lt;li&gt;
                                                    &lt;div class="tooltip"&gt;
                                                        &lt;asp:LinkButton ID="like_linkbtn" runat="server" CommandName="Like" OnClick="Like_Click"&gt;&lt;%#(Eval("name_like").ToString() == "") ? "Like" : Eval("name_like")%&gt;&lt;/asp:LinkButton&gt;
                                                        &lt;img class="tool-img" src="images/likes.png"&gt; : &lt;%#Eval("like_counter") %&gt;
                                                        &lt;/img&gt;&lt;/div&gt;
                                                &lt;/li&gt;
                                                &lt;li&gt;
                                                    &lt;div class="tooltip"&gt;
                                                        &lt;asp:LinkButton ID="hate_linkbtn" runat="server" CommandName="Hate"&gt;&lt;%#(Eval("name_hate").ToString() == "") ? "Hate" : Eval("name_hate")%&gt;&lt;/asp:LinkButton&gt;
                                                        &lt;img class="tool-img" src="images/hate.png"&gt; : &lt;%#Eval("hate_counter") %&gt;
                                                        &lt;/img&gt;&lt;/div&gt;
                                                &lt;/li&gt;
                                            &lt;/ul&gt;
                                        &lt;/div&gt;
                                        &lt;div class="finish"&gt;
                                        &lt;/div&gt;
                                    &lt;/div&gt;
                                    &lt;/ContentTemplate&gt;
                    &lt;/asp:UpdatePanel&gt;
                                &lt;/ItemTemplate&gt;
                            &lt;/asp:Repeater&gt;
</code></pre>

<p>And the server side code </p>

<pre><code>  protected void Like_Click(object sender, EventArgs e)
    {
        LinkButton1.Text = DateTime.Now.ToString();
    }
  protected void MyButtonCommandEvent(object source, RepeaterCommandEventArgs e)
    {
        var postID = e.Item.FindControl("postID_hidden") as HiddenField;
        NewUser user = new NewUser();
        if (e.CommandName == "Like")
        {
            user.like_post(int.Parse(postID.Value), (int)Session["accountID"]);
        }
        else
        {
            if (e.CommandName == "Hate")
            {
                user.hate_post(int.Parse(postID.Value), (int)Session["accountID"]);
            }
        }

      // repeater_databind();//This will refresh all the contents of the repeater(bad way)
    }
</code></pre>

<p>So as can see databind is not working for me because I want to refresh only one item in the repeater control and not the whole items, can anyone help me please ? </p>

<p><strong>Edit :</strong> 
Problem solved by wrapping the whole repeater in another updatepanel and setting the trigger like this</p>

<pre><code>&lt;asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false"&gt;
                    &lt;ContentTemplate&gt;
                    &lt;Triggers&gt; 
    &lt;asp:AsyncPostBackTrigger ControlID="Repeater1" EventName="MyButtonCommandEvent" /&gt; 
&lt;/Triggers&gt; 
</code></pre>
