单用户登录

时间:2019-03-08 09:08:11
【文件属性】:
文件名称:单用户登录
文件大小:1.97MB
文件格式:RAR
更新时间:2019-03-08 09:08:11
单用户,.NET 登录代码:protected void Button1_Click(object sender, EventArgs e) { SqlConnection myCon = new SqlConnection("Server=(local);Database=db_SingleuserLogin;User Id=sa;Password=111111"); myCon.Open(); SqlCommand myCom = new SqlCommand("select count(*) from tb_Login where UserID= '" + TextBox1.Text.Trim() + "' and UserPwd='" + TextBox2.Text.Trim() + "'", myCon); int i = Convert.ToInt32(myCom.ExecuteScalar()); if (i > 0) Response.Redirect("Main.aspx"); else Response.Write(""); myCon.Close(); } protected void Button2_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox2.Text = ""; }
【文件预览】:
Single-userLogin
----Web.Config(2KB)
----Login.aspx.cs(1KB)
----Main.aspx.cs(405B)
----Login.aspx(2KB)
----01.psd(393KB)
----Default.aspx.cs(383B)
----App_Data()
--------db_Register.mdf(3MB)
--------db_SingleuserLogin_log.ldf(1024KB)
--------db_SingleuserLogin.mdf(3MB)
----Main.aspx(641B)
----Default.aspx(445B)
----01.jpg(19KB)

网友评论