filluserid.aspx.cs
来自「基于JSP+SQL Sever2000+Tomcat的网络服务器体系结构开发技术」· CS 代码 · 共 35 行
CS
35 行
using System;
using System.Data;
using System.Data.SqlClient;
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 FrontDesk_FindPwd_FillUserID : System.Web.UI.Page
{
DataCon myCon = new DataCon();
protected void btnSure_Click(object sender, EventArgs e)
{
SqlConnection sqlconn = myCon.getCon();
sqlconn.Open();
SqlCommand sqlcom = new SqlCommand("select count(*) from tb_User where UserID='" + txtUserID.Text + "'", sqlconn);
int count = Convert.ToInt32(sqlcom.ExecuteScalar());
if (count > 0)
{
Session["UserID"] = txtUserID.Text;//给FillQuePwd.aspx和FindPwd.aspx页传值
Response.Redirect("FillQuePwd.aspx");
}
else
{
Response.Write("<script>alert('没有该用户ID');location='javascript:history.go(-1)'</script>");
return;
}
sqlconn.Close();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?