0

I have sql dataSource which i have binded with gridview.

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.

but its not showing updatede value untill page refresh.

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

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

1 Answer 1

1

This example miss code that forces UpdatePanel be changed. By default it would intercept any child posyback events. So just set Rating's AutoPostBack="true"

Sign up to request clarification or add additional context in comments.

2 Comments

there is not such property in rating
@Pankaj Mishra Hmm, may be we are talking about different controls, but asp.net/ajax/ajaxcontroltoolkit/samples/Rating/Rating.aspx this control contains this property!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.