MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

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

Viewed 9132 time(s), 3 post(s) 2/5/2013 5:32:25 AMby super
super

super

2/5/2013 5:32:25 AM

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....

This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

2/5/2013 7:58:55 AM
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
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
super

super

2/5/2013 2:35:37 PM
thanks khorvat, problem solved - You are the best !!!
This content has not been rated yet. 
6018 Reputation 709 Total posts