-
Notifications
You must be signed in to change notification settings - Fork 0
/
zc.aspx.cs
65 lines (60 loc) · 1.71 KB
/
zc.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
public partial class zc : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
PD s = new PD();
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text.Length == 0)
{
Label1.Visible = true;
Label2.Visible = false;
Label3.Visible = false;
}
else if (TextBox2.Text.Length == 0)
{
Label1.Visible = false;
Label2.Visible = true;
Label3.Visible = false;
}
else if(TextBox3.Text.Length==0)
{
Label1.Visible = false;
Label2.Visible = false;
Label3.Visible = true;
Label3.Text = "请确认密码";
}
else if(TextBox2.Text!=TextBox3.Text)
{
Label1.Visible = false;
Label2.Visible = false;
Label3.Visible = true;
Label3.Text = "请输入相同的密码";
}
else
{
Label1.Visible = Label2.Visible = false;
if (s.zc(TextBox1.Text, TextBox2.Text))
{
Response.Write("<script>alert('注册成功!')</script>");
Response.Redirect("Login.aspx");
}
else
{
Response.Write("<script>alert('用户名或密码错误!')</script>");
}
}
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Login.aspx");
}
}