能发求一个18mss的邀请码ac邀请码吗

想要一个邀请码?麻烦能发一个给我吗? 谢谢 。麻烦发去 _百度知道
想要一个邀请码?麻烦能发一个给我吗? 谢谢 。麻烦发去
其他类似问题
您可能关注的推广
邀请码的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁==========================================================
web页的设计:
&configuration&
&&& &system.web&
&&&&&&& &compilation debug=&true& targetFramework=&4.0& /&
&&& &/system.web&
&&connectionStrings&
&&&add name=&studentconStr& connectionString=&Data Source=.;Initial Catalog=数据库名;User ID=连接数据库账号;Password=连接数据库密码&/&
&&/connectionStrings&
&/configuration&
===========================================================
regin.aspx页的设计:
&html xmlns=&&&
&head runat=&server&&
&&& &title&&/title&
&&& &style type=&text/css&&
&&&&&&& .style1
&&&&&&&&&&& width: 237
&&&&&&& .style2
&&&&&&&&&&& width: 91
&&& &/style&
&&& &form id=&form1& runat=&server&&
&&& &div style=&background-color:#eeeeee&&
&&&&&&& &table style=&width:50%;&&
&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&& &td class=&style1&&
&&&&&&&&&&&&&&&&&& 用户名:&/td&
&&&&&&&&&&&&&&& &td class=&style2&&
&&&&&&&&&&&&&&&&&&& &asp:TextBox ID=&TextBox1& runat=&server&&&/asp:TextBox&
&&&&&&&&&&&&&&& &/td&
&&&&&&&&&&& &/tr&
&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&& &td class=&style1&&
&&&&&&&&&&&&&&&&&&& 密码:&/td&
&&&&&&&&&&&&&&& &td class=&style2&&
&&&&&&&&&&&&&&&&&&& &asp:TextBox ID=&TextBox2& runat=&server& style=&margin-left: 0px&&&/asp:TextBox&
&&&&&&&&&&&&&&& &/td&
&&&&&&&&&&& &/tr&
&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&& &td class=&style1&&
&&&&&&&&&&&&&&&&&&& 邮箱地址:&/td&
&&&&&&&&&&&&&&& &td class=&style2&&
&&&&&&&&&&&&&&&&&&& &asp:TextBox ID=&TextBox3& runat=&server&&&/asp:TextBox&
&&&&&&&&&&&&&&& &/td&
&&&&&&&&&&& &/tr&
&&&&&&&&&&& &tr&
&&&&&&&&&&&&&&& &td class=&style1&&
&&&&&&&&&&&&&&&&&&& &asp:Button ID=&Button1& runat=&server& onclick=&Button1_Click& Text=&Button& /&
&&&&&&&&&&&&&&& &/td&
&&&&&&&&&&&&&&& &td class=&style2&&
&&&&&&&&&&&&&&&&&&& &&/td&
&&&&&&&&&&& &/tr&
&&&&&&& &/table&
&&& &/div&
&&& &/form&
================================================================
regin.aspx.cs页的设计:
namespace 激活注册
&&& public partial class regin : System.Web.UI.Page
&&&&&&& protected void Page_Load(object sender, EventArgs e)
&&&&&&& public void sendMail(string email, string activeCode)
&&&&&&&&&&& MailMessage mailMsg = new MailMessage();
&&&&&&&&&&& mailMsg.From = new MailAddress(&&);
&&&&&&&&&&& mailMsg.To.Add(email);
&&&&&&&&&&& mailMsg.Subject = &请激活注册&;
&&&&&&&&&&&
&&&&&&&&&&& StringBuilder contentBuilder = new StringBuilder();
&&&&&&&&&&& contentBuilder.Append(&请单击以下链接完成激活&);
&&&&&&&&&&& contentBuilder.Append(&&a href='CheckActiveCode.aspx ?activecode=& + activeCode + &&id=8'&激活&/a&&);
&&&&&&&&&&& mailMsg.Body = contentBuilder.ToString();//拼接字符串
&&&&&&&&&&& mailMsg.IsBodyHtml =
&&&&&&&&&&& SmtpClient client = new SmtpClient();
&&&&&&&&&&& //发件方服务器地址
&&&&&&&&&&& client.Host = &&;
&&&&&&&&&&& NetworkCredential credetial = new NetworkCredential();
&&&&&&&&&&& credetial.UserName = &126邮箱的账号&;
&&&&&&&&&&& credetial.Password = &126邮箱的密码&;
&&&&&&&&&&& client.Credentials =
&&&&&&&&&&& client.Send(mailMsg);
&&&&&&& protected void Button1_Click(object sender, EventArgs e)
&&&&&&&&&&& string username = this.TextBox1.T
&&&&&&&&&&& string password = this.TextBox2.T
&&&&&&&&&&& string email = this.TextBox3.T
&&&&&&&&&&& //生成激活码,Guid为唯一标示符
&&&&&&&&&&& string activeCode = Guid.NewGuid().ToString().Substring(0, 8);//生成激活码
&&&&&&&&&&& string conStr = ConfigurationManager.ConnectionStrings[&studentconStr&].ConnectionS
&&&&&&&&&&&
&&&&&&&&&&& using (SqlConnection con = new SqlConnection(conStr))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& string sql = &insert into&数据库名 &(UserName,PassWord,Email,Active,ActiveCode) values(@username,@password,@email,@active,@activecode)&;
&&&&&&&&&&&&&&& SqlParameter[] prams=new SqlParameter[]{
&&&&&&&&&&&&&&& new SqlParameter(&@username&,username),
&&&&&&&&&&&&&&& new SqlParameter(&@password&,password),
&&&&&&&&&&&&&&& new SqlParameter(&@email&,email),
&&&&&&&&&&&&&&& new SqlParameter(&@active&,false),
&&&&&&&&&&&&&&& new SqlParameter(&@activecode&,activeCode)
&&&&&&&&&&&&&&& };
&&&&&&&&&&&&&&& using (SqlCommand cmd = new SqlCommand(sql, con))
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& con.Open();
&&&&&&&&&&&&&&&&&&& cmd.Parameters.AddRange(prams);
&&&&&&&&&&&&&&&&&&& number=cmd.ExecuteNonQuery();
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&&&&&& if (number & 0)
&&&&&&&&&&& {
&&&&&&&&&&&&&&& sendMail(email, activeCode);//给注册用户发邮件
&&&&&&&&&&&&&&& Response.Redirect(&reginMessage.aspx&);
&&&&&&&&&&& }
&&&&&&&&&&& else
&&&&&&&&&&& {
&&&&&&&&&&&&&&& Response.Write(&注册失败,请重新注册!&);
&&&&&&&&&&& }
========================================================================
CheckActiveCode.aspx.cs设计:
&protected void Page_Load(object sender, EventArgs e)
&&&&&&&& //1、取出参数id
&&&&&&&&&&& int id = Convert.ToInt32(Request[&id&]);
&&&&&&&&&&& string activeCode = Request[&activecode&].ToString();
&&&&&&&&&&& //2、判断id为id的记录是否存在
&&&&&&&&&&& //连接数据库
&&&&&&&&&&& string conStr = ConfigurationManager.ConnectionStrings[&studentconStr&].ConnectionS
&&&&&&&&&&&
&&&&&&&&&&& using (SqlConnection con = new SqlConnection(conStr))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& string sql = &select count(*) from 数据库名 where &;
&&&&&&&&&&&&&&& using (SqlCommand cmd = new SqlCommand(sql, con))
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& con.Open();
&&&&&&&&&&&&&&&&&&& cmd.Parameters.AddWithValue(&@id&, id);
&&&&&&&&&&&&&&&&&&& number = Convert.ToInt32(cmd.ExecuteScalar());
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&&&&&& if (number & 0)
&&&&&&&&&&& {
&&&&&&&&&&&&&&& string AC;
&&&&&&&&&&&&&&& //如果该用户存在取出器ActiveCode字段进行比较,如果一样,把Active字段改为true
&&&&&&&&&&&&&&& using (SqlConnection con = new SqlConnection(conStr))
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& string sql = &select ActiveCode from 数据库名 where &;
&&&&&&&&&&&&&&&&&&& using (SqlCommand cmd = new SqlCommand(sql, con))
&&&&&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&&&&&& con.Open();
&&&&&&&&&&&&&&&&&&&&&&& cmd.Parameters.AddWithValue(&@id&, id);
&&&&&&&&&&&&&&&&&&&&&&& AC = cmd.ExecuteScalar().ToString();
&&&&&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&& if (activeCode == AC)
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& Response.Write(&激活成功&);
&&&&&&&&&&&&&&&&&&& using (SqlConnection con = new SqlConnection(conStr))
&&&&&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&&&&&& string sql = &update&数据库名 set Active=true where &;
&&&&&&&&&&&&&&&&&&&&&&& using (SqlCommand cmd = new SqlCommand(sql, con))
&&&&&&&&&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&&&&&&&&&& con.Open();
&&&&&&&&&&&&&&&&&&&&&&&&&&& cmd.Parameters.AddWithValue(&@id&, id);
&&&&&&&&&&&&&&&&&&&&&&&&&&& number = Convert.ToInt32(cmd.ExecuteScalar());
&&&&&&&&&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&& }
&&&&&&&&&&&&&&& else
&&&&&&&&&&&&&&& {
&&&&&&&&&&&&&&&&&&& Response.Write(&用户名已存在,但激活验证码错误&);
&&&&&&&&&&&&&&& }
&&&&&&&&&&& }
&&&&&&&&&&& else
&&&&&&&&&&& {
&&&&&&&&&&&&&&& Response.Write(&用户名不存在,还没注册成功&);
&&&&&&&&&&& }
=======================================================================
reginMessage.aspx设计:
&&& &form id=&form1& runat=&server&&
&&& 恭喜您,注册成功!请激活!
&&& &/div&
&&& &/form&
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:86814次
积分:2446
积分:2446
排名:第6679名
原创:162篇
转载:11篇
评论:16条
(1)(2)(1)(1)(6)(4)(6)(6)(2)(2)(14)(17)(25)(9)(17)(12)(19)(14)(8)(7)(ERROR:15) & 访客不能直接访问你好。。能发一个地信网的邀请码吗?急求、、_百度知道
你好。。能发一个地信网的邀请码吗?急求、、
提问者采纳
jpg" />注册成功后请及时采纳我的回答.hiphotos://d.baidu、私信(页面的右上方)留给你邀请码./zhidao/wh%3D450%2C600/sign=/zhidao/wh%3D600%2C800/sign=/zhidao/pic/item/267f9e2fb454b999ac.baidu.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><img class="ikqb_img" src="http,查收一下<a href="http://d.hiphotos.jpg" esrc="http://d.baidu已经用这里的H i
请发到我的qq邮箱吧,谢谢,
已发送到你的邮箱,请查收如果收件箱没有就看看垃圾箱
提问者评价
已注册成功。。非常感谢!!
其他类似问题
地信网的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 求一个acfun的邀请码 的文章

 

随机推荐