asp.net裡面的身分識別驗證和授權

來源:互聯網
上載者:User

今天閑著無聊.想起來了ASP.NET身分識別驗證.感覺良好.貼出下列代碼:
login.aspx HTML代碼


<%@ Page language="c#" Codebehind="02Login.aspx.cs" AutoEventWireup="false" Inherits="身分識別驗證._02Login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>02Login</title>
        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="javascript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
        <form id="Form1" method="post" runat="server">
            <FONT face="宋體">
                <TABLE id="Table1" style="Z-INDEX: 102; LEFT: 152px; WIDTH: 446px; POSITION: absolute; TOP: 80px; HEIGHT: 72px"
                    cellSpacing="1" cellPadding="1" width="446" border="1">
                    <TR>
                        <TD>
                            <asp:label id="Label1" runat="server">使用者名稱稱:</asp:label></TD>
                        <TD>
                            <asp:textbox id="tbName" runat="server" Width="183px"></asp:textbox></TD>
                        <TD>
                            <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="使用者名稱不可為空!" ControlToValidate="tbName"></asp:requiredfieldvalidator></TD>
                    </TR>
                    <TR>
                        <TD>
                            <asp:label id="Label2" runat="server">密碼:</asp:label></TD>
                        <TD>
                            <asp:textbox id="tbPass" runat="server" Width="183px"></asp:textbox></TD>
                        <TD>
                            <asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" ErrorMessage="密碼不可為空!" ControlToValidate="tbPass"></asp:requiredfieldvalidator></TD>
                    </TR>
                    <TR>
                        <TD><FONT face="宋體">是否儲存Cookie</FONT></TD>
                        <TD>
                            <asp:checkbox id="PersistCookie" runat="server"></asp:checkbox></TD>
                        <TD></TD>
                    </TR>
                </TABLE>
                <asp:button id="btnLoginBetter" style="Z-INDEX: 101; LEFT: 288px; POSITION: absolute; TOP: 240px"
                    runat="server" Width="78px" Text="登入"></asp:button>
                <asp:HyperLink id="HyperLink1" style="Z-INDEX: 103; LEFT: 456px; POSITION: absolute; TOP: 240px"
                    runat="server" NavigateUrl="Default.aspx">HyperLink</asp:HyperLink></FONT>
        </form>
    </body>
</HTML>

共3頁: 上一頁 1 [2][3]下一頁



相關文章

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。