reg.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 System.Data.SqlClient;
public partial class UserCenter_reg : System.Web.UI.Page
{
SqlConnection con = DB.getcon();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string username = this.TextBox1.Text.ToString();
string pwd = this.TextBox2.Text.ToString();
int age = Convert.ToInt32(this.TextBox6.Text.ToString());
string sex = Convert.ToString(this.DropDownList1.SelectedValue);
string email = this.TextBox5.Text.ToString();
if (Page.IsValid)
{
checkuser();
int roleid = 8;
string strpwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(pwd.Trim(),"md5").ToString().ToLower().Substring(8,16);
if (adduser(roleid, username, strpwd, age, sex, email))
{ Response.Write("<script laguage='javascript'>alert('注册成功!');window.location.href('<%=Request.ApplicationPath%>/Front.aspx')</script>"); }
else
{
Response.Write("<script laguage='javascript'>alert('注册失败,请重新注册!');window.location.href('reg.aspx')</script>");
}
}
else
{
Response.Redirect("reg.aspx");
}
}
//添加用户
public bool adduser(int Roleid,string Username,string Pwd,int Age,string Sex,string Email)
{
con.Open();
后面还有 70 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
