[Back]

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="View.ascx.cs" Inherits="AdefWebserver.Modules.SimpleSurvey.View" %>
<%@ Register TagPrefix="dbwc" Namespace="AdefWebserver.Modules.SimpleSurvey" %>
<asp:LinkButton ID="lnkBack" runat="server" OnClick="lnkBack_Click" Visible="False">[Back]</asp:LinkButton>
<asp:LinkButton ID="lnkResults" runat="server" OnClick="lnkResults_Click">[Survey Results]</asp:LinkButton>
&nbsp;<asp:LinkButton ID="lnkAdminSurveyResults" runat="server" OnClick="lnkAdminSurveyResults_Click">[Admin Survey Results]</asp:LinkButton><br />
<br />
<asp:Panel ID="pnlQuestion" runat="server">
    <dbwc:DynamicControlsPlaceholder ID="DCP" runat="server" ControlsWithoutIDs="DontPersist">
    </dbwc:DynamicControlsPlaceholder>
    <asp:Literal ID="ltValidation" runat="server"></asp:Literal>
    <br />
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
</asp:Panel>
<asp:Panel ID="pnlLoggedIn" runat="server" Visible="False">
    You must log in to participate in this Survey.
</asp:Panel>
<asp:Panel ID="pnlResults" runat="server" Visible="False">
    <asp:ListView ID="lvResults" runat="server">
        <ItemTemplate>
            <tr style="">
                <td valign="top">
                    <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
                </td>
                <td colspan="2">
                    <asp:ListView ID="lvOptions" runat="server" DataSource='<%# Eval("Options") %>'>
                        <LayoutTemplate>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr style="">
                                <td>
                                    &nbsp;
                                </td>
                                <td align="center">
                                    <asp:Label ID="OptionLabel" runat="server" Text='<%# Eval("Option") %>' />
                                </td>
                                <td align="center">
                                    <asp:Label ID="CountLabel" runat="server" Text='<%# Eval("Count") %>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:ListView>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="">
                <tr>
                    <td>
                        No data was returned.
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <LayoutTemplate>
            <table runat="server" cellspacing="4" cellpadding="2">
                <tr runat="server">
                    <td runat="server">
                        <table id="itemPlaceholderContainer" runat="server" border="0" style="">
                            <tr runat="server" style="">
                                <th runat="server">
                                    <b>Question</b>
                                </th>
                                <th id="Th1" runat="server">
                                    <b>Option</b>
                                </th>
                                <th id="Th2" runat="server">
                                    <b>Responses</b>
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="">
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:ListView>
</asp:Panel>