Ajax实现用户注册

时间:2012-04-13 03:57:56
【文件属性】:
文件名称:Ajax实现用户注册
文件大小:1.04MB
文件格式:RAR
更新时间:2012-04-13 03:57:56
Ajax 用户注册 Ajax实现用户注册实例 //检测用户名是否存在 public bool checkName(string RolesName) { SqlConnection userConnection = Connection.getConnection(); SqlCommand userCommand = new SqlCommand("checkName", userConnection); userCommand.CommandType = CommandType.StoredProcedure;//采用存储过程 userCommand.Parameters.Add("@RolesName", SqlDbType.VarChar, 50);//存储过程参数 userCommand.Parameters["@RolesName"].Value = RolesName;//给参数赋值 userCommand.Connection.Open();//打开连接 int n = (int)userCommand.ExecuteScalar();//返回首行首列,如果存在的话返回1 userCommand.Connection.Close();//关闭连接 if (n > 0) { return true; } else { return false; } }
【文件预览】:
AJAXReg43
----App_Code()
--------Connection.cs(685B)
--------User.cs(4KB)
----DisposeEvent.aspx(453B)
----CreateObject.js(3KB)
----DisposeEvent.aspx.cs(1KB)
----Web.config(8KB)
----App_Data()
----Default.aspx(1KB)
----Default.aspx.cs(383B)
----images()
--------true.gif(1KB)
--------false.gif(1KB)
数据库
----DbName_log.ldf(1024KB)
----DbName.mdf(3MB)

网友评论