欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

asp.net登陸前臺(tái)后臺(tái)源代碼

 前臺(tái)代碼:

創(chuàng)新互聯(lián)是一家專業(yè)提供永吉企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站建設(shè)、網(wǎng)站制作、html5、小程序制作等業(yè)務(wù)。10年已為永吉眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)公司優(yōu)惠進(jìn)行中。

<head>
    <title></title>
     <style type="text/css">
        body {font:12px Helvetica, Arial, sans-serif;  margin:100px auto; padding:0; word-wrap:break-word; word-break:break-all; background-color:#016BA9;}
        .login1{background-p_w_picpath: url(../Images/login_1.jpg); width:960px; height:94px; margin:0 auto;}
        .login2{background-p_w_picpath: url(../Images/login_2.jpg); width:960px; height:49px; margin:0 auto; }
        .login3{background-p_w_picpath: url(../Images/login_3.jpg); width:960px; height:125px; margin:0 auto;}
        .login4{background-p_w_picpath: url(../Images/login_4.jpg); width:960px; height:91px; margin:0 auto;}
        .loginTXT{border: 1px solid #800000; width:150px; background-color:#866961; color:#fff; height:19px;}
    </style>
      <script type="text/javascript">
          if (top.location != self.location)
              top.location = self.location; 

          function CheckIn() {
              var names = document.getElementById("txtU_Name").value;
              var pass = document.getElementById("txtU_Pass").value;
              var check = document.getElementById("txtU_Check").value;
              if (names == "") {
                  alert("請(qǐng)輸入用戶名...");
                  document.getElementById("txtU_Name").focus();
                  return false;
              }
              else if (pass == "") {
                  alert("請(qǐng)輸入用戶密碼...");
                  document.getElementById("txtU_Pass").focus();
                  return false;
              }
              else if (check == "") {
                  alert("請(qǐng)輸入驗(yàn)證碼...");
                  document.getElementById("txtU_Check").focus();
                  return false;
              }
          }
    </script>
</head>
<body>
<form id="form1" runat="server" defaultfocus="txtU_Name" defaultbutton="BtnLogin">
    <div class="login1"></div>
    <div class="login2"></div>
    <div class="login3">
           <table cellpadding="0" cellspacing="1" border="0" style="margin-left:320px; width:300px;">
    <tr>
        <td>用戶名稱:</td>
        <td> <asp:textbox ID="txtU_Name" runat="server" class="loginTXT"   maxlength="20"></asp:textbox></td>
    </tr>
    <tr>
        <td>用戶密碼:</td>
        <td> <input id="txtU_Pass" type="password"  runat="server" class="loginTXT" maxlength="6"/></td>
    </tr>
    <tr>
        <td>驗(yàn)證代碼:</td>
        <td><asp:textbox ID="txtU_Check" runat="server" class="loginTXT" style="width:85px;" maxlength="5"/>&nbsp;<img src="../VateImage.ashx" onclick="this.src='../VateImage.ashx?'+ new Date().getTime()" alt="看不清楚再換一張!" style="vertical-align:middle;"/></td>
    </tr>
    <tr>
        <td colspan="2"><hr /></td>
    </tr>
    <tr>
        <td></td>
        <td>
            <asp:button ID="BtnLogin" runat="server" text="登錄管理" OnClientClick="return CheckIn()" onclick="BtnLogin_Click" />
             &nbsp;<asp:button ID="BtnHome" runat="server" text="返回首頁" 
                onclick="BtnHome_Click" />
        </td>
    </tr>
   </table>
    </div>
    <div class="login4"></div>
    </form>
</body>
</html>

 

 

 

 

 

后臺(tái)代碼:

 

 

 protected void BtnLogin_Click(object sender, EventArgs e)
    {
        string username = txtU_Name.Text;
        string pwd = txtU_Pass.Value;
        string check = txtU_Check.Text;

        if (CheckNull())
        {
            if (check.ToString().ToLower() == Session["ValidateCode"].ToString().ToLower())
            {
                string strsql = "select count(1) from Login where UserName='" + username + "' and UserPwd='" + pwd + "'";
                object obj = SqlHelper.ExecuteScalar(ConfigurationManager.ConnectionStrings["conn"].ToString(), CommandType.Text, strsql);
                if (obj != null && (int)obj > 0)
                {
                    Response.Write("<script> alert('登錄成功!')</script>");
                    Session["username"] = username;

                    HttpCookie hc = new HttpCookie("username", username);
                    hc.Expires = DateTime.Now.AddMinutes(1);
                    Response.Cookies.Add(hc);

                    Response.Redirect("Main.aspx");
                }
                else
                {
                    Response.Write("<script> alert('用戶名或密碼錯(cuò)誤!')</script>");
                    Response.Write("<script>window.location.href='Login.aspx'</script>");
                }
            }
            else
            {
                Response.Write("<script> alert('驗(yàn)證碼錯(cuò)誤!')</script>");
                Response.Write("<script>window.location.href='Login.aspx'</script>");

            }
        }


    }
    private bool CheckNull()
    {
        return (!(string.IsNullOrEmpty(txtU_Name.Text.Trim())) && !(string.IsNullOrEmpty(txtU_Pass.Value.Trim())) && !(string.IsNullOrEmpty(txtU_Check.Text.Trim()))) ? true : false;
    }

 

main主頁代碼:page_Load

 try
        {
            string username = Session["username"].ToString();
        }
        catch
        {
            Response.Write("<script>alert('請(qǐng)從主頁面登錄!');location.href='Login.aspx';</script>");
        }

 

 

網(wǎng)站標(biāo)題:asp.net登陸前臺(tái)后臺(tái)源代碼
文章URL:http://chinadenli.net/article12/jsisdc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、微信公眾號(hào)、域名注冊(cè)、動(dòng)態(tài)網(wǎng)站、網(wǎng)頁設(shè)計(jì)公司、靜態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司
成人精品欧美一级乱黄| 日韩欧美第一页在线观看| 高清一区二区三区四区五区| 激情图日韩精品中文字幕| 欧美亚洲美女资源国产| 经典欧美熟女激情综合网| 久久精品国产99精品亚洲| 精品欧美国产一二三区| 草草视频福利在线观看| 极品少妇嫩草视频在线观看| 欧美日韩国产福利在线观看| 免费高清欧美一区二区视频| 神马午夜福利一区二区| 国产精品日韩精品一区| 国产精品午夜一区二区三区 | 亚洲高清亚洲欧美一区二区| 好吊妞视频这里有精品| 欧美日韩精品一区二区三区不卡| 久久综合日韩精品免费观看| 欧美日韩人妻中文一区二区 | 国产精品成人一区二区在线| 欧美有码黄片免费在线视频| 国产又猛又黄又粗又爽无遮挡 | 国产又粗又猛又长又黄视频| 日韩精品一区二区亚洲| 亚洲av日韩一区二区三区四区| 日本午夜一本久久久综合| 日本免费一本一二区三区| 色无极东京热男人的天堂| 久久免费精品拍拍一区二区| 日韩成人中文字幕在线一区| 欧美色欧美亚洲日在线| 中文字幕高清免费日韩视频| 日韩美成人免费在线视频| 欧美精品亚洲精品日韩专区| 丁香六月婷婷基地伊人| 九九热国产这里只有精品| 欧美日韩亚洲国产av| 亚洲乱妇熟女爽的高潮片| av一区二区三区天堂| 欧美亚洲综合另类色妞|