登陸頁面

本人是初學者,參考前人代碼,一邊學習,一邊把內容分享給你們。。。。。。
頁面效果以下:
 ide


登陸頁面
 login.aspx 中代碼參考以下:
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="0" cellspacing="0">
            <caption>
                歡迎光臨
            </caption>
            <tr>
                <td>
                    用戶名:
                </td>
                <td>
                    <input type="text" id="txtUserName" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    密&nbsp;&nbsp;&nbsp;碼:
                </td>
                <td>
                    <input type="password" id="txtUserPwd" runat="server" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" value="登陸" id="btnSubmit" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>學習

 login.aspx.cs中代碼參考以下:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.IsPostBack)
        {
            this.Response.Write("你提交的用戶名:" + this.Request.Form["txtUserName"]);
            this.Response.Write("你提交的密碼:" + this.Request.Form["txtUserPwd"]);
        }
    }this

相關文章
相關標籤/搜索