All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Delphi变量、类、对象、函数规范化命名
PHP连接MYSQL的两种方法_php资料_编程技术
SQL jdbc解决自动自动增长列统一处理问题纪实_[SQL Server教程]
动态网页制作技巧PHP:详细彻底学习Smarty_php资料_编程技术
MySQL创始人支招Oracle,建议转售MySQL_mssql学习_编程技术
SQLServer分页查询通用存储过程_[SQL Server教程]
C#根据条件搜索Infopath生成的XML数据_.net资料_编程技术
delphi内存映像的步骤
C#网络应用编程基础练习题与答案(三)_.net资料_编程技术
PHP技巧:通过实例深入剖析require和include的用法_[PHP教程]
Reading number is top 10 pictures
黑社会大哥相亲
NeedWallpaper7
Earthquake hedge common sense
Sora aoi in China1
到南昌西站了1
Kim jong il's mistress, national beauty JinYuJi actor2
Azusa Yamamoto2
西游日记2
29 the belle stars after bath figure4
Average female college students1
Download software ranking
Tram sex maniac 2 (H) rar bag14
Unix video tutorial11
美女写真3
传奇私服架设教程
apache-tomcat-6.0.33
WebService在.NET中的实战应用教学视频 → 第2集
Love the forty days
双旗镇刀客A
Detective task-the top secret prostitution files
Unix video tutorial1
归海一刀 published in(发表于) 2014/1/30 0:58:15 Edit(编辑)
Asp.Net+Ajax,用户名检测_[Asp.Net教程]

Asp.Net+Ajax,用户名检测_[Asp.Net教程]

Asp.Net+Ajax 用户名检测_[Asp.Net教程]























AJAX用户名检测




前台的JS代码:


前台的控件:


查询页checkusername.aspx的后台代码:
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 checkusername : System.Web.UI.Page
{
private string sConnectionString = ConfigurationManager.ConnectionStrings["WebConnString"].ToString();
protected void Page_Load(object sender, EventArgs e)
{
string sUserName = Request.QueryString["username"].Trim().ToString();
using (SqlConnection conn = new SqlConnection(sConnectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand("SELECT COUNT(*) FROM tbWebManage WHERE UserName=@UserName", conn))
{
cmd.Parameters.AddWithValue("@UserName", sUserName);
string sResult = Convert.ToString(cmd.ExecuteScalar());
Response.Clear();
if (sResult == "0")
{
Response.Write("1");
}
else
{
Response.Write("0");
}
Response.End();
}
}
}




}

来源:cnblogs














































添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.