⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.aspx.cs

📁 多种模式留言系统 本留言系统 支持多种模式 一 签写留言模式 二 留言本模式 三 论坛模式 应用了第三的文本编辑器 支持动态更改网站标题 动态添加广告 支持留言头像选择
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string auid = uid.Text.ToString();
        int buid = Convert.ToInt32(odb.scr("select count(*) from [admin] where [uid]='" + auid + "'"));

        string apwd = pwd.Text.ToString();
        int bpwd = Convert.ToInt32(odb.scr("select count(*) from [admin] where [pwd]='" + apwd + "'"));

        if (buid > 0 && bpwd >0)
        {
            Session["qx"] = odb.scr("select qx from [admin] where [uid]='" + auid + "'");
            Session["uid"] = odb.scr("select uid from [admin] where [uid]='" + auid + "'"); ;

            Response.Redirect("admin.aspx");
        }
        else
        {
            if (buid <= 0)
                uid.Text = "用户名错误";
            if (bpwd <= 0)
                uid.Text = uid.Text + " & 密码错误";
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -