How to Bind Sql DataSource using code?
<p>I have sql dataSource which i have binded with gridview.</p>

<p>where i have column name Rate where i am using ajax rating through that i am updating value in to data base and i also want to show that value after updation.</p>

<p>but its not showing updatede value untill page refresh.</p>

<pre><code>&lt;ItemTemplate&gt;
    &lt;table border="0" cellpadding="0" cellspacing="0" width="auto"&gt;
        &lt;tr style="width:150px;" valign="top" &gt;
            &lt;td style="height:30px;"&gt;
            &lt;asp:Label ID="lblTotalRate" runat="server" 
                    Text='&lt;%#DataBinder.Eval(Container.DataItem, "TotalRate")%&gt;'&gt;&lt;/asp:Label&gt;

            &lt;/td&gt;
        &lt;/tr&gt;   
        &lt;tr style="width:150px;" valign="top" &gt;
            &lt;td style="height:30px;"&gt;
                &lt;asp:UpdatePanel ID="updtpnlTweet" runat="server"&gt;
                    &lt;ContentTemplate&gt;
                        &lt;cc1:Rating ID="rateTweet" runat="server" CurrentRating='&lt;%# Bind("Rating") %&gt;' 
                            EmptyStarCssClass="empatyStarRating" FilledStarCssClass="filledStarRating" 
                            MaxRating="5" onchanged="rateTweet_Changed" StarCssClass="ratingStar" 
                            WaitingStarCssClass="savedStarRating"&gt;
                        &lt;/cc1:Rating&gt;
                    &lt;/ContentTemplate&gt;
                &lt;/asp:UpdatePanel&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
&lt;/ItemTemplate&gt;
</code></pre>
