Mono Support how to refresh only poll web part instead of whole page on voting ? (Zatvorena)

15633 put(a) pogledan, 3 odgovor(a), 5.2.2013. 5:32:25 - Kreirao(la) super
5.2.2013. 5:32:25
6018 Reputacija 709 Ukupno objava

right now I have poll on my website but users on my website complained that my site poll is not user friendly..if anyone votes on poll, it refreshes the whole page n takes then to top of the page ...it should only refresh the poll web part n not the whole page...

feature request : please solve this issue in monox n make it more user friendly....

1
5.2.2013. 7:58:55
15993 Reputacija 2214 Ukupno objava

Hi,

thanks for the feedback we have updated the Poll WebPart and added UpdatePanel so it's dynamically updated now. In order to fix this in your build you will have to update the following  mark-up file or wait for the next nightly build and upgrade.

To fix the issue update the "~\Portal\MonoX\ModuleGallery\PollModule.ascx" with the following:

<%@ Control
    Language="C#"
    AutoEventWireup="true"
    Inherits="MonoSoftware.MonoX.ModuleGallery.MonoXPollModule"
    CodeBehind="PollModule.ascx.cs" %>
 
<asp:Panel runat="server" ID="pnlContainer">
    <div class="poll">
        <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
            <ContentTemplate>
                <h2><asp:Label runat="server" ID="lblQuestion"></asp:Label></h2>
                <asp:Panel runat="server" ID="pnlInput" Width="100%">
                    <asp:RadioButtonList runat="server" ID="rblAnswers" CellPadding="5">
                    </asp:RadioButtonList>
                    <div class="button-holder">
                        <asp:LinkButton runat="server" ID="btnVote" OnClick="btnVote_Click" CssClass="styled-button" />
                        <asp:LinkButton runat="server" ID="btnResults" OnClick="btnResults_Click" CssClass="styled-button" />
                    </div>
                </asp:Panel>
                <asp:Panel runat="server" ID="pnlGraph" Width="100%">
                    <asp:Repeater runat="server" ID="rptGraph">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblAnswer" CssClass="answer" Text='<%# GetAnswerText(Eval("Answer").ToString(), int.Parse(Eval("Votes").ToString())) %>'></asp:Label>
                            <div class="poll-holder">
                                <asp:Panel runat="server" ID="pnlWidth" BackColor='<%# GetColor(Eval("Color").ToString()) %>' Width='<%# GetWidth(Eval("Votes").ToString()) %>' CssClass='<%# GetColor(Eval("Color").ToString()).Equals(System.Drawing.Color.Empty) ? "poll-bg-color" : String.Empty  %>'></asp:Panel>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div class="button-holder">
                        <asp:LinkButton runat="server" ID="btnShowVotePanel" OnClick="btnShowVotePanel_Click" CssClass="styled-button" />
                        <strong class="total-votes"><asp:Label runat="server" ID="lblTotal"></asp:Label></strong>
                    </div>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Panel>
Regards

2
5.2.2013. 14:35:37
6018 Reputacija 709 Ukupno objava

thanks khorvat, problem solved - You are the best !!!

3
Ovo je MonoX demo site. Posjetite Mono Software za više detalja.