reg.aspx.cs
资源名称:yjal.rar [点击查看]
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:2k
源码类别:
Email客户端
开发平台:
Visual C++
- using System;
- using System.Data;
- 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;
- using User;
- public partial class reg : PageBase
- {
- Reg mereg = new Reg();
- jc jcme = new jc();
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void valiuserbtn_Click(object sender, EventArgs e)
- {
- if (user_txt.Text.Length == 0)
- {
- Response.Write("<script>alert('抱歉,你的用户名是空的');</script>");
- }
- else
- {
- bool yes = jcme.jcuser(user_txt.Text);
- if (yes)
- {
- user_txt.Text = "";
- user_txt.Focus();
- Response.Write("<script>alert('抱歉,你的用户名已经是存在的了!请更换新的用户名!');</script>");
- }
- else
- {
- Response.Write("<script>alert('恭喜,你的用户名字未被使用');</script>");
- }
- }
- }
- protected void yesregbtn_Click(object sender, EventArgs e)
- {
- if (user_txt.Text.Length == 0)
- {
- Response.Write("<script>alert('抱歉,你的用户名是空的');</script>");
- }
- else {
- int x = mereg.RegUser(user_txt.Text, pwd_txt.Text, qrpwd_txt.Text, email_txt.Text);
- if (x != -1)
- {
- Response.Redirect("Default.aspx");
- }
- else {
- Response.Write("<script>alert('注册失败');</script>");
- }
- }
- }
- }