ASP.NET AJAX入门系列(1):概述

经常关注我的Blog的朋友可能注意到了,在我Blog的左边系列文章中,已经移除了对Atlas学习手记系列文章的推荐,因为随着ASP.NET AJAX 1.0 Beta版的发布,它们已经不再适用,为了不继续误导广大朋友,所以不再作为推荐系列文章,如果有需要参考的朋友,可以直接到随笔分类中查看。

ASP.NET AJAX Beta改动如此之大,鉴于又没有很好的中文参考资料,所以决定最近开始写作ASP.NET AJAX入门系列,这个系列我会把ASP.NET AJAX当作一个全新的东西去对待,不再考虑以前的Atlas,把自己对ASP.NET AJAX的研究与大家分享,便于初学的朋友少走一些弯路。对Atlas熟悉的朋友可以推荐看Dflying Chen的《拥抱变化——从AtlasASP.NET AJAX系列》,以及老赵的《深入Atlas系列》。由于个人的能力和掌握的程度有限 ,难免出现错误和遗漏的地方,还请大家多多理解和指正。

OK,让我们从这里开始!

 

一.ASP.NET AJAX组成部分

ASP.NET AJAX官方网站上有如下三个下载:

1ASP.NET AJAX:这部分是ASP.NET AJAX的核心部分,包括了核心AJAX类型系统,网络协议层(networking stack),组件模型,扩展器(extender)基类,以及与ASP.NET集成的服务器端功能(包括广受欢迎的ScriptManagerUpdatePanel,和 Timer控件)。功能列表如下:

服务端功能列表

Asynchronous client-to-server networking

Authentication as a Web service

ControlExtender class

Profile as a Web service

ScriptManager and ScriptManagerProxy controls

Static page methods as Web services

Timer control

UpdatePanel control

UpdateProgress control

客户端功能列表

Authentication for JavaScript

Behavior class

Calling .asmx Web services from JavaScript

Component class

Control class

Debug class

JavaScript Array type extensions

JavaScript Boolean type extensions

JavaScript Error type extensions

JavaScript Number type extensions

JavaScript Object type extensions

JavaScript String type extensions

JSON serialization

Profile for JavaScript

Trace class

2ASP.NET AJAX “Value-Add”CTPASP.NET AJAX社区支持的“增值”CTP部分,包括了以前各个Atlas CTP版本包含的,但并不在完全支持的“核心”1.0 版本内的额外的高级特性。通过进一步的反馈,这些将会逐步稳定的增加到核心1.0中去。功能列表如下:

服务端功能列表

AutoCompleteExtender class

Cross-browser Web Parts drag-and-drop

DragOverlayExtender control

PopupExtender class

客户端功能列表

Actions components

AutoCompleteBehavior class

BatchResponse class

Binding component

Button control

Checkbox control

Click behavior

Counter class

Cross-browser Web Parts

Data control

DragDropList control

DragDropManager component

DraggableListItem control

FadeAnimation component

Floating behavior

Hover behavior

Hyperlink control

Image control

Input control

Label control

Layout behavior

Opacity behavior

Popup behavior

Selector control

ServiceMethodRequest class

Sys.Data and Sys.UI.Data namespaces

Textbox control

Timer control

Validator controls

xml-script support

3ASP.NET AJAX Control Toolkit:包含了基于ASP.NET AJAX 1.0 版“核心”下载版本的28个非常酷的免费AJAX控件。它是一个开源项目,由微软和非微软开发人员共同开发的,去CodePlex下载代码。

 

二.安装ASP.NET AJAX

1.在安装ASP.NET AJAX 1.0 Beta之前,需要先卸载以前所有的CTP版本。

2.下载ASP.NET AJAX 1.0 Beta安装包,安装时Microsoft.Web.Extensions.dll程序集将被安装在GACGlobal Assembly Cache)中,所以使用时不需要再在Web站点的Bin文件夹中包括该程序集。

3.下载安装ASP.NET AJAX “Value-Add”CTPASP.NET AJAX Control Toolkit。列表如下:

名称

描述

Accordion:

Create efficient UI from multiple panes with this animated control.

AlwaysVisibleControl

Docks a panel to a corner of the browser window and keeps it visible even when the user scrolls.

Animation

Adds powerful, easy to use animations to any element or control.

CascadingDropDown

Easily link drop downs, complete with asynchronous population and no postbacks!

CollapsiblePanel

This extender allows panels on your page to collapse and expand with no code.

ConfirmButton

This extender adds a confirm dialog to any Button, LinkButton, or ImageButton control.

DragPanel

Makes any panel into an object that you can drag around the page.

DropDown

This extender can wrap any control to provide a SharePoint-style drop-down menu that is attached to the control.

DropShadow

This extender adds attractive drop shadows to any control on the page

DynamicPopulate

Replace the contents of a page element with the result of a web-service call.

FilteredTextBox

Restrict the types of input that text boxes will accept.

HoverMenu

Allows UI to pop up next to a control when the mouse hovers over it.

ModalPopup

Allows you to show styled modal UI without using HTML dialogs.

MutuallyExlcusiveCheckBox

By adding a number of checkboxes to the same “Key”, only one checkbox with the specified key can be checked at a time.

NoBot

Applies simple rules to prevent automated bots or scripts from posting to a page.

NumericUpDown

Allow users to easily increase and decrease values using the mouse to scroll through values.

PagingBulletedList

Add paging and sorting to long bulleted lists.

PasswordStrength

Give your users visual cues to help them create secure passwords.

PopupControl

This extender turns any panel into a popup.

Rating

Let your users easily give feedback by rating content with this easy-to-use control.

ReorderList

This control is a full-featured data-bound control that allows its elements to be reordered on the client via drag and drop.

ResizableControl

Allow users to dynamically resize content, right in the browser

RoundedCorners

Rounds the corners of any control for a clean, professional look!

Slider

Adds an elegant scrollbar-like user interface for setting numeric values.

TextBoxWatermark

This extender adds "watermark" prompt text to TextBoxes on the page.

ToggleButton

This extender turns an ASP.NET CheckBox into an image checkbox.

UpdatePanelAnimation

Animates page elements corresponding to hidden postback activity.

ValidatorCallout

This extender enhances the functionality of existing ASP.NET validators.

 

三.在Visual Studio.NET 2005开发基于ASP.NET AJAX的应用

安装完ASP.NET AJAX后,打开Visual Studio.NET 2005中新建Web Site,在项目模板中会出现一项ASP.NET AJAX-enabled Web site,直接选择它就可以了,如下图:

新建完成的项目中会自动在Web.config中做好相关的配置,并且AJAXExtensionToolbox.dll已经添加到了VS的工具箱中,不需要再手工添加。

 

概述篇简单的介绍这里,从下一篇开始学习ASP.NET AJAX中的每一项具体的功能。

下篇预告:ASP.NET AJAX入门系列(2):使用ScriptManager

作者:TerryLee
出处:http://terrylee.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
posted @ 2006-10-24 23:14 TerryLee 阅读(56820) 评论(75)  编辑 收藏 所属分类: [08]  Web开发[07]  AJAX风云

  回复  引用  查看    
#1楼2006-10-24 23:17 | Jeffrey Zhao      
我的深入Atlas系列后续的文章正在酝酿中。:)
  回复  引用  查看    
#2楼[楼主]2006-10-24 23:18 | TerryLee      
@Jeffrey Zhao
我跟着你和Dflying学了哦:)

最近事情太多了,有两个系列要写

  回复  引用  查看    
#3楼2006-10-24 23:20 | neuhawk      
除了updatePanel,用到的还真不多.
  回复  引用  查看    
#4楼2006-10-24 23:20 | Jeffrey Zhao      
@TerryLee
深入系列其实蛮难写的,很容易别人就不要看了,所以我必须想的清楚一些。:)

  回复  引用  查看    
#5楼[楼主]2006-10-24 23:23 | TerryLee      
@neuhawk
很多人也只是用UpdatePanel,我觉得应该还有很多东西要去学习的:)

  回复  引用  查看    
#6楼[楼主]2006-10-24 23:24 | TerryLee      
@Jeffrey Zhao
的确是这样的,还是有很多人是“会用就好”,不去深入

其实我也是,深入部分看你的文章:)

  回复  引用  查看    
#7楼2006-10-24 23:27 | neuhawk      
我希望有更实用的控件,如datagrid,tab,等增强版,
希望更接近winform的操作效果.

  回复  引用  查看    
#8楼[楼主]2006-10-24 23:30 | TerryLee      
@neuhawk
现在ASP.NET AJAX还没有直接提供这些控件

  回复  引用  查看    
#9楼2006-10-24 23:41 | neuhawk      
可这些才是开发想要的啊.我看过很多js的控件都不错,可是就很难封装成服务控件.
  回复  引用    
#10楼2006-10-24 23:43 | TheOld[未注册用户]
@TerryLee ,@Jeffrey Zhao
请问第一个包安装后并无UpdateProgress control,而安装了CTP包才出现在常规项中,使用起来也不方便,是怎么回事?而且不以asp:开头,也不以atlas开头是以ccl开头

  回复  引用  查看    
#11楼[楼主]2006-10-24 23:44 | TerryLee      
@neuhawk
-_-

  回复  引用    
#13楼2006-10-25 00:35 | TheOld[未注册用户]
@TerryLee
是官方网站上的那三个标准包啊
我只下了两个 ajax 和 CTP 没下开源的那个28个控件的那个包
我同事只装了一个 就是第一个包 也没有的UpdateProgress control

PS:好晚了啊

  回复  引用    
#14楼2006-10-25 00:37 | TheOld[未注册用户]
顺便纠正一下我说的那个一ccl:开通的是CTP版本控件
  回复  引用  查看    
#15楼[楼主]2006-10-25 08:31 | TerryLee      
@TheOld
我安装了没这个问题啊,奇怪,问问老赵?

  回复  引用    
#16楼2006-10-25 10:12 | isonny[未注册用户]
我装完也没有UpdateProgress control :(
  回复  引用  查看    
#17楼[楼主]2006-10-25 10:15 | TerryLee      
@isonny
晚上回去看看,还没看到这块,没怎么注意

  回复  引用  查看    
#18楼2006-10-25 11:51 | KiddLee      
开始学习
  回复  引用  查看    
#19楼[楼主]2006-10-25 13:14 | TerryLee      
@KiddLee
变化很大,一起从头开始学习吧

  回复  引用    
#20楼2006-10-25 14:19 | xiao[匿名][未注册用户]
怎么不把下载地址也一起贴出来呢 :(
  回复  引用    
#21楼2006-10-25 20:24 | sun00wen00sheng[未注册用户]
不好意思,第一次做这样的事情,不太懂规矩。
  回复  引用    
#22楼2006-10-25 20:25 | sun00wen00sheng[未注册用户]
不好意思,第一次做这样的事情(博客),不太懂规矩。
  回复  引用    
#23楼2006-10-25 20:26 | 金戈铁马[未注册用户]
关注你的讲座积极努力学习!掌握新知识。
  回复  引用  查看    
#25楼[楼主]2006-10-25 23:01 | TerryLee      
@金戈铁马
:)

  回复  引用  查看    
#26楼[楼主]2006-10-25 23:06 | TerryLee      
@sun00wen00sheng
1.转载可以,请注意我Blog右边版权声明:署名!

2.转载请不要删除文章中的任何部分!

  回复  引用    
#27楼2006-10-26 14:01 | minghui227[未注册用户]
为什么我在拉一个标准里的控件他会提示找不到程序集,而用 Ajax Extensions 就正常呢?有人能告诉我下吗?
  回复  引用  查看    
#28楼[楼主]2006-10-26 21:58 | TerryLee      
@minghui227

不太明白什么意思?

  回复  引用    
#29楼2006-10-29 18:17 | 品雨凉秋[未注册用户]
我装完也没有我装完也没有UpdateProgress control :(  
  回复  引用  查看    
#30楼2006-10-30 11:03 | Patrick Zhang      
UpdateProgress control 包含在ASP.NET AJAX “Value-Add”CTP中,将来会包含在核心里
  回复  引用  查看    
#31楼[楼主]2006-10-30 11:30 | TerryLee      
@Patrick Zhang
谢谢老赵:)

  回复  引用    
#32楼2006-11-13 13:57 | robert.fang[未注册用户]
感谢前辈,!!!!!!!!!!!!!!!!
  回复  引用  查看    
#33楼[楼主]2006-11-13 16:40 | TerryLee      
@robert.fang
客气,前辈可不敢当:)

  回复  引用    
#34楼2006-11-20 16:22 | qiang82[未注册用户]
关于UpdateProgress control我在安装了CTP以后仍然缺少,在工具箱中添加C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll可选出该控件,但还会见到其他诸如customValidator等控件,此时的UpdateProgress仅在创建CTP网站时为<asp:,请问如何解决,在Beta1的时候就这样,不同的是那时,UpdateProgress control 如果没记错的话在Microsoft.Web.Preview.dll中
  回复  引用    
#35楼2006-11-28 15:59 | 小鱼儿[匿名][未注册用户]
请问这个只能在VS2005里用吗?
  回复  引用  查看    
#36楼[楼主]2006-11-28 18:36 | TerryLee      
@小鱼儿[匿名]
没错,只能在05中使用:)

  回复  引用  查看    
#38楼[楼主]2006-12-03 23:38 | TerryLee      
@stephen2006
:)

  回复  引用    
#39楼2007-01-04 11:00 | 9[未注册用户]
9
  回复  引用    
#40楼2007-01-19 10:11 | lili[未注册用户]
正头痛那些“蝌蚪”文字,现在有这个太好了,支持!
  回复  引用  查看    
#41楼[楼主]2007-01-20 00:28 | TerryLee      
@lili
客气了:)

  回复  引用    
#42楼2007-01-23 09:47 | Tony Wang[未注册用户]
剧烈的支持!!
  回复  引用  查看    
#43楼[楼主]2007-01-23 22:50 | TerryLee      
@Tony Wang
谢谢:)

  回复  引用    
#44楼2007-01-31 12:00 | snryang[未注册用户]
学习
  回复  引用    
#45楼2007-01-31 21:29 | enetianzh[未注册用户]
前辈你负责写,我负责读,你研究得越透彻,我走得弯路就越少,谢谢了!
呵呵,,,,,,

  回复  引用    
#46楼2007-02-06 21:18 | test[未注册用户]
@Tony Wang
testtest

  回复  引用    
#47楼2007-02-28 15:53 | holyli[未注册用户]
谢谢,十分好的教程。
  回复  引用    
#48楼2007-03-03 14:34 | Ryan[未注册用户]
关注中~关注中
  回复  引用    
#49楼2007-03-06 17:08 | andy[未注册用户]
每一篇都在關注中!先謝謝!
  回复  引用    
#50楼2007-07-29 10:18 | 笑剑[未注册用户]
我也跟着你学吧,虽然原来学了一点点,每个控件的大部分功能理解了,但是理解的不算太透彻~~~希望你能把每个控件用中文详细的解释出来吧,我会好好的记录下来的;最好能把每个控件常用的属性的什么功能也给解释下 可以吗????先谢谢喽!!!
  回复  引用    
#52楼2007-11-29 14:25 | CRIG[未注册用户]
看了你的不少文章了,一直没回呵呵,实在不好意思不回了。。技术上没啥说的,你是刚刚地!希望你多多写出这些引路的好文章!THANKS VERY
  回复  引用    
#53楼2008-02-15 16:31 | max342343236234[未注册用户]
www.sower4.com/products/disperser
分散机
www.sower4.com/products/milling
砂磨机
www.sower4.com/products/mixer
搅拌机
www.sower4.com/products/filling-equipments
涂料灌装机
www.sower4.com/products/customized
涂料成套设备
www.lika.com.cn/塑料托盘

  回复  引用  查看    
#54楼2008-06-05 09:31 | 网际的风      
用ajax,一定要安装ASP.NET AJAX 1.0 Beta吗?
不是安装了vs2005以后就可以直接用的吗?

  回复  引用    
#55楼2008-06-09 19:34 | 神在人间[未注册用户]
好文章,我喜欢,认真研读中...
  回复  引用  查看    
#56楼2008-06-09 19:39 | zagelover      
好好学习,天天向上,向主人致敬
  回复  引用    
#57楼2008-07-21 16:13 | RI[未注册用户]
讲了些什么东西?很多东西都没有。GS
  回复  引用    
#58楼2008-09-29 21:46 | tinalucky1984[未注册用户]
向楼主学习:)
  回复  引用    
#59楼2008-10-31 09:34 | jack_net[未注册用户]
学习
  回复  引用    
#60楼2009-01-10 17:25 | toplee[未注册用户]
刚开始研究这块,自己探索了几天,感觉有点晕,呵呵,万幸的是碰到了楼主此系列文章,定会认真拜读,感谢!!
  回复  引用  查看    
#61楼[楼主]2009-01-12 11:01 | TerryLee      
@toplee
:)

  回复  引用    
#62楼2009-02-09 22:28 | 归依[未注册用户]
学习了,谢谢
  回复  引用    
#63楼2009-05-25 00:26 | haven24
好好研究



发表评论

昵称: [登录] [注册]

主页:

邮箱:(仅博主可见)

评论内容:

  登录  注册

[使用Ctrl+Enter键快速提交评论]

0 538898




相关文章:

相关链接: