我创建了两个界面:
一个是关于用户登录的
一个是关于用户注册的
现在我要用“注册时填的用户名和密码”登陆第一个界面
具体应该怎样做啊
protected void Button1_Click(object sender, EventArgs e)
{
//获取用户名和密码
string name = txtuser.Text;
string pass = txtpass.Text;
if (this.txtuser.Text.Trim() == "" || this.txtpass.Text.Trim() == "")
{
this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('用户名和密码不能为空')</script>");
return;
}
if (TextBox1.Text != Label5.Text)
{
this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('验证码不匹配请重新填写')</script>");
return;
}
if (txtuser.Text == "123" && txtpass.Text == "123")
{
Response.Redirect("Creat.aspx?userName=" + txtpass.Text + "");
}
我使用的是用户名123密码也是123
怎样改啊
我们还没学到连接数据库啊?老师要求用 Session