<%@ page language="C#" autoeventwireup="true" masterpagefile="MyShopMasterPage.master" inherits="Member_PassportIndex, WebApp_deploy" title="通行证资料" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <div style="line-height: 6px;">
            &nbsp;</div>
        <asp:Panel ID="pnlCheck" runat="server">
            <table class="ShopOrderStyle">
                <caption>
                    通行证资料</caption>
                <tr>
                    <td class="OrderTitle" style="width: 180px;">
                        密码问题：
                    </td>
                    <td>
                        <asp:Literal ID="TxtQuestion" runat="server" />
                        [<asp:HyperLink ID="hlQuestionLink" runat="server" Text="设置问题"></asp:HyperLink>]
                    </td>
                </tr>
                <tr>
                    <td class="OrderTitle">
                        答案：
                    </td>
                    <td>
                        <asp:Literal ID="TxtAnswer" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="OrderTitle">
                        Email：
                    </td>
                    <td>
                        <asp:Literal ID="TxtEmail" runat="server" />
                        [<a href="../Passport/confirm_email.aspx" target="_blank">修改</a>]
                    </td>
                </tr>
                <tr>
                    <td class="OrderTitle">
                        登录密码：
                    </td>
                    <td>
                        <asp:Literal ID="TxtPassword" runat="server" Text="******" />
                        [<a href="../Passport/PasswordManager.aspx" target="_blank">修改</a>]
                    </td>
                </tr>
                <tr>
                    <td class="OrderTitle">
                    </td>
                    <td>
                        <asp:Button ID="Button1" runat="server" Text=" 取 消 " OnClientClick="history.back();return false;" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlAddQuestion" runat="server">
            <table class="ShopOrderStyle">
                <caption>
                    设置密码的问题</caption>
                <tr>
                    <td class="OrderTitle">
                        密码问题：
                    </td>
                    <td>
                        <asp:DropDownList ID="H_UserQuestion" runat="server" DataTextField="Name">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="OrderTitle">
                        问题答案：
                    </td>
                    <td>
                        <asp:TextBox ID="H_UserAnswer" runat="server" /><label class="error" id="lblAnswer">
                        </label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;">
                        <asp:Button ID="btnAddQuestion" runat="server" Text="设置" OnClientClick="return checkpass()"
                            OnClick="btnAddQuestion_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <script type="text/javascript">
        $(function () {
            var Answer = $("#<%=H_UserAnswer.ClientID %>");
            Answer.blur(function () {
                if (Answer.val().length == 0) {
                    $("#lblAnswer").text('请输入您的答案');
                    $("#lblAnswer").css("color", "red");
                } else {
                    $("#lblAnswer").text('');
                    $("#lblAnswer").css("color", "");
                }
            });
        });
        function checkpass() {
            var Answer = $("#<%=H_UserAnswer.ClientID %>");
            if (Answer.val().length == 0) {
                $("#lblAnswer").text('请输入您的答案');
                $("#lblAnswer").css("color", "red");
                Answer.focus();
                return false;
            }
            $("#lblAnswer").text('');
            $("#lblAnswer").css("color", "");
            return true;
        }
    </script>
</asp:Content>
