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

Reading number is top 10 articles
扩展GridView控件(七)——改变通过CheckBox选中的行的样式_[Asp.Net教程]
ASP.NET2.0缓存(Cache)技术_[Asp.Net教程]
SQL 2000和Sql 2005相互转换方法_[SQL Server教程]
数据库连接URL中分号引发的错误_.net资料_编程技术
[delphi语法5]delphi中Case语句的使用方法
MS-SQL数据库开发常用汇总_[SQL,Server教程]
下拉菜单的简单制作_JavaScript技术_编程技术
用PHP程序实现支持页面后退的两种方法_php资料_编程技术
利用UrlRewrite,asp.net动态生成htm页面_[Asp.Net教程]
C#教程:C#2.0 新特性 局部类
Reading number is top 10 pictures
Li Zongrui hunting video screenshots1
The hot big eye big breast beauty3
The money of more than 100 countries and regions5
Compared GDP and per capita income in China for 40 years
The Soviet union swimsuit exposure in the 70 year1
女人化妆前后的对比
Get girl by your hand
教你22句话
Born After 90 Beijing sports university campus flower photos1
In the world the most mysterious 21 place landscape1
Download software ranking
Unix video tutorial19
Tram sex maniac 2 (H) rar bag11
网络管理员第三版
传奇私服架设教程
Visual C++界面编程技术
Tram sex maniac 2 (H) rar bag14
Unix video tutorial18
Unix video tutorial13
Boxer's Top ten classic battle4
Tram sex maniac 2 (H) rar bag8
归海一刀 published in(发表于) 2014/1/30 1:00:28 Edit(编辑)
ASP.NET自动检测用户名是否注册(利用AJAX技术)_[Asp.Net教程]

ASP.NET自动检测用户名是否注册(利用AJAX技术)_[Asp.Net教程]

ASP.NET自动检测用户名是否注册(利用AJAX技术)_[Asp.Net教程]

ASP.NET自动检测用户名是否注册(利用AJAX技术)(在IE和Firefox运行通过)
design by hakuci
代码下载
运行环境ASP.NET 2.0 , AJAX扩展包,SQLServer数据库,配置好开发环境后才可以运行本例子代码。
本代码基于三层架构

在空的解决方案里,添加项目:Model、DAL、BLL 、DBUtility和一个基于AJAX技术网站项目
Model 模型
包括:类DesingerInfo.cs 存放实体类,用于数据访问层和逻辑层调用
DAL 数据访问层
包括:类Desinger.cs 用于创建各种数据对象的方法,这里有配置文件和反射的运用。
BLL 业务逻辑层
包括:类Desinger.cs 处理应用程序的业务逻辑,被表示层调用
DBUtility公共数据访问层
包括:类SQLHelper.cs 实现具体的ExecuteReader,ExecuteDataTable,ExecuteNonQuery等
网站项目就是表示层:
数据库表结构(本例子用到的只是第一个字段)

新建页面“Register.aspx”,添加控件TextBox 和AJAX Extensions的UpDatePanel和UpdateProgress控件
如下图:

控件放入内容和设置属性
UpDatePanel的内容

UpDatePanel的设置 添加异步回送处理 控件绑定到文本框,事件为文本改变时发生。
UpdateProgress的内容

UpdateProgress的属性设置 绑定UpdatePanel



运行效果如下:(在IE和Firefox运行通过)


代码分析
///
/// 设计师 检测是否注册 URL自动生成
///

///
///
protected void TxtName_TextChanged(object sender, EventArgs e)
{
BLL.Desinger bllData = new Desinger();//创建对象
if (bllData.Exists(this.TxtName.Text.Trim())) //判断是否存在此用户
{
this.LblCheckName.Text = "不允许注册!";
this.LblCheckName.Visible = true;
}
else
{
this.LblCheckName.Text = "允许注册!";
this.LblCheckName.Visible = true;
}
this.LabelURL.Text = "http://localhost/Designer/" + this.TxtName.Text;
}

代码下载

design by hakuci
2008.4.22






添加到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.