adminlogin.aspx.cs
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:1k
源码类别:

Email客户端

开发平台:

Visual C++

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using background;
  12. public partial class Manage_adminlogin : System.Web.UI.Page
  13. {
  14.     logins ls = new logins();
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.         adminnametxt.Focus();
  18.     }
  19.     protected void querenbtn_Click(object sender, EventArgs e)
  20.     {
  21.         if (yzmtxt.Text != Session["code"].ToString())
  22.         {
  23.             Response.Write("<script>alert('验证码是错误的');</script>");
  24.         }
  25.         else {
  26.             if (ls.admin(adminnametxt.Text.Trim(), passtxt.Text.Trim()))
  27.             {
  28.                 Session["admin"] = adminnametxt.Text.Trim();
  29.                 Response.Redirect("index.aspx");
  30.             }
  31.             else {
  32.                 Response.Write("<script>alert('登录失败');location='adminlogin.aspx';</script>");
  33.             }
  34.         }
  35.     }
  36. }