Hi spindz In this scenario, I would like to suggest you try to set the
AutoPostBack="true" to your
rating control. If the facing issue still cannot be resolved, please post the related code here, we will glad to help. Thanks.
I seem to have the same problem when using the Rating control inside the UpdatePanel as well. I can't seem to update the contents inside the UpdatePanel after rating an item. Do you know where to connect to the database once you rated an item? I'm lost
as to where to open the connection to the database to save the Rating value. I've tried it in the Rating_Changed event but there was an error. My Rating control autopostback is set to True.
I'm very much appreciated for any help on what alternatives I can try to resolve this.
spindz
Member
122 Points
39 Posts
rating control & updatepanel
Nov 14, 2008 08:54 PM|LINK
Hi all,
i have a datalist that contains rating control and the datalist is inside an updatepanel .
i want to update my datalist with a new datasource but it doesn't work.
when i remove my rating control it doesn't have any problem, it works.
either if i remove the updatepanel and try to a full postback, it's works too.
why this could happen??is rating control doesn't compatible with updatepanel?
does anyone have a solution?
thanks in advance
Ferdinand
Lance Zhang ...
All-Star
33091 Points
2361 Posts
Re: rating control & updatepanel
Nov 18, 2008 05:33 AM|LINK
In this scenario, I would like to suggest you try to set the AutoPostBack="true" to your rating control.
If the facing issue still cannot be resolved, please post the related code here, we will glad to help.
Thanks.
spindz
Member
122 Points
39 Posts
Re: rating control & updatepanel
Nov 18, 2008 08:24 PM|LINK
Hi Lance Zhang - MSFT,
i tried set the autopostback=true but still my datalist doesn't update..
here's my code :
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:DataList ID="DataList1" runat="server" Width="245px"> <ItemTemplate> <asp:HyperLink id="HyperLink1" runat="server" Width="100px" Height="100px" NavigateUrl='<%# GenerateLinkHyperlink1(Eval("IdVideo")) %>' ImageUrl='<%# GenerateLink(Eval("IdVideo")) %>'>Watch Video</asp:HyperLink> <asp:Label id="Label16" runat="server" Width="68px" Text="Title" Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="Label3" runat="server" Width="27px" Text=": " Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="lblTitle" runat="server" Width="195px" Text='<%# Eval("JudulVideo") %>' Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="Label13" runat="server" Width="69px" Text="Duration " Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="Label2" runat="server" Width="27px" Text=": " Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="lblDuration" runat="server" Width="195px" Text='<%# GenerateDurasi(Eval("Durasi")) %>' Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <asp:Label id="Label14" runat="server" Width="60px" Text="Rating" Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> <cc1:Rating id="Rating1" AutoPostBack="true" runat="server" Width="196px" Height="24px" ReadOnly="True" WaitingStarCssClass="savedRatingStar" StarCssClass="ratingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" CurrentRating='<%# GenerateRating(Eval("IdVideo")) %>' BehaviorID="RatingBehavior1"> </cc1:Rating> <asp:Label id="lblPlayed" runat="server" Text='<%# GenerateCountPlay(Eval("PlayCount")) %>' Height="24px" ForeColor="White" Font-Size="10pt" Font-Bold="True"></asp:Label> </ItemTemplate> <SeparatorTemplate> <hr /> </SeparatorTemplate> </asp:DataList> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Click" /> </Triggers> </asp:UpdatePanel> <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Font-Bold="True" Font-Size="10pt">Previous Page</asp:LinkButton> <asp:Label ID="lblPageOf" runat="server" Font-Bold="True" Font-Size="10pt" ForeColor="White" Height="16px" Width="128px"></asp:Label> <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click" Font-Bold="True" Font-Size="10pt">Next Page</asp:LinkButton>please help me,
thanks in advance
Regards, Ferdinand
Ferdinand
spindz
Member
122 Points
39 Posts
Re: rating control & updatepanel
Nov 23, 2008 01:28 PM|LINK
is there anyone can help my issue??
anyone?
Ferdinand
ajaxiskool
Member
15 Points
7 Posts
Re: rating control & updatepanel
Mar 13, 2009 07:55 PM|LINK
Hi Spindz,
I seem to have the same problem when using the Rating control inside the UpdatePanel as well. I can't seem to update the contents inside the UpdatePanel after rating an item. Do you know where to connect to the database once you rated an item? I'm lost as to where to open the connection to the database to save the Rating value. I've tried it in the Rating_Changed event but there was an error. My Rating control autopostback is set to True.
I'm very much appreciated for any help on what alternatives I can try to resolve this.