qtleft.ascx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class qtleft : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["uname"] != null)
{
Panel2.Visible = true;
Panel1.Visible = false;
}
else
{
//Session.Abandon();
Panel1.Visible = true;
Panel2.Visible = false;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string sql;
sql = "select * from xuesheng where xuehao='" + TextBox1.Text.ToString().Trim() + "' and mima='" + TextBox2.Text.ToString().Trim() + "'";
DataSet result = new DataSet();
sqlConn conn = new sqlConn();
result = conn.hsggetdata(sql);
if (result.Tables[0].Rows.Count > 0)
{
Session["uname"] = TextBox1.Text.ToString().Trim();
Session["mima"] = TextBox2.Text.ToString().Trim();
Session["userid"] = result.Tables[0].Rows[0]["ID"].ToString();
Response.Write("<script>location.href='default.aspx';</script>");
}
else
{
Response.Write("<script>javascript:alert('登陆失败,用户名或密码错误!');location.href='default.aspx';</script>");
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Write("<script>javascript:alert('安全退出!');location.href='default.aspx';</script>");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。