You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
493 B
16 lines
493 B
4 months ago
|
using System;
|
||
|
using System.Data;
|
||
|
|
||
|
public partial class login : System.Web.UI.Page
|
||
|
{
|
||
|
protected void Page_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
protected void Button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
DBClass db1 = new DBClass();
|
||
|
string strsql = "select * from register where username='" + TextBox1.Text + "' and password='" + TextBox2.Text + "'";
|
||
|
DataTable dt = db1.GetRecords(strsql);
|
||
|
if (dt != null && dt.Rows.Count == 1) //登录成功
|