asp教程.net用户注册程序
asp教程x.cs" inherits="register" %>
var msg = eval(data);
if (msg == 1) {
$("#spanusercode").html('sorry该用户名已经存在!');
$("#btnregister").hide();
} else {
$("#spanusercode").html('恭喜您该用户名可以使用!');
$("#btnregister").show();
}
})
return result;
}
后台:
protected void btnregister_click(object sender, eventargs e)
{
string usercode = txtusercode.text.trim();
string userpwd = common.getmd5(txtpwd.text.trim());
string username = txttruename.text;
string sql = string.empty;stringbuilder sb = new stringbuilder();
sb.append("insert into nw_admin(nw_usercode,nw_pwd,nw_username,nw_class)");
sb.append("values('" + usercode + "','" + userpwd + "','" + username + "',0)");
int temp = sqlhelp.executesql(sb.tostring());
if (temp > 0)
common.jsredirect("注册成功!", "questionlist.aspx");
}
%>
//ashx文件:作为服务器与数据库教程交互,js传过来的用户名
using system;
using system.web;public class register : ihttphandler {
public void processrequest (httpcontext context) {
context.response.contenttype = "text/plain";
if (!string.isnullorempty(context.request["usercode"]))
{
string usercode = context.request["usercode"].tostring();
string sql = "select count(1) from nw_admin where nw_usercode='"+usercode.trim()+"'";
bool result = sqlhelp.exists(sql);
if (result)
context.response.write(1);
else
context.response.write(0);
}
}
public bool isreusable {
get {
return false;
}
}}
%》
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类
房东模拟器最新版2024
房东模拟器中文版是一个超级有趣的模拟经营类型的手游,这个游戏