1:推几个博客和网址:
http://dflying.cnblogs.com/
http://terrylee.cnblogs.com/
http://thcjp.cnblogs.com/
http://jeffreyzhao.cnblogs.com/
http://blogs.msdn.com/dmitryr/
http://www.cnblogs.com/RChen/
http://www.hanselman.com/blog/archives.aspx
http://www.cnblogs.com/birdshome/
http://www.nikhilk.net/
http://www.cnblogs.com/hunts/
http://www.ajaxpro.info/
当然最主要的是 http://www.asp.net/
2:接下来是一些书:
Wrox - Professional.Ajax
OReilly.Programming.Atlas.Sep.2006
Apress.Pro.Ajax.and.the.dot.NET.2.0.Platform
可以在google找一下有下的也可以直接联系我ghl133@yahoo.com.cn
基础书: ajax基础
国内最值得期待的是: dflying的书
还有一本就是 http://book.csdn.net/subject/0704aspnet/
3:资料基本就这样.现在来介绍安装:
http://ajax.asp.net/default.aspx?tabid=47
下载的几个东西的介绍:
ASP.NET 2.0 AJAX Extensions 1.0 是VS的扩张;
ASP.NET AJAX Control Toolkit 控件库,
Microsoft AJAX Library 类库,
ASP.NET Futures (May 2007) 这是最新的扩充,里面有Silverlight controls, dynamic data controls, dynamic languages,
ASP.NET 2.0 AJAX Extensions 1.0 Source Code ,ASP.NET 2.0 AJAX的源代码;
安装要注意:ajax toolkit安装时在vs2005中右面工具箱中要添加"选项"引用,添加本地的AjaxControlToolkit.dll就可以.
4:创建一个asp.net2.0 ajax程序:
这里创建模式一共有两个 asp.net ajax-enabled web Site和asp.net furures ajax web Site,asp.net ajax-enabled web Site住要是ajax应用程序,而asp.net furures ajax web Site主要silverlight的应用;
还可以选择多语言开发四种:Vb,C#这两种几静态语言,还有两种动态语言是IronPython,ManagedJScript,这里要说一说如是 web开发的应该多用动态语言这是未来的主流,应该主动去适应这两种语言,没有多久还有支持Ruby如果感兴趣的可以到下载
http://wilcoding.xs4all.nl/Wilco/Downloads/Programming/IronRuby/IronRuby-0.0.1.0.zip
,在这里就选择创建一个asp.net ajax-enabled web Site,给一段代码你可以复制到你的程序上体验asp.net ajax;
<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
Default.aspx.cs
"
Inherits
=
"
_Default
"
%>
<% @ Register Assembly = " System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "
Namespace = " System.Web.UI " TagPrefix = " asp " %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head runat ="server" >
< title > Untitled Page </ title >
</ head >
< body >
< form id ="form1" runat ="server" >
< asp:ScriptManager ID ="ScriptManager1" runat ="server" />
< div >
来到这里先是第一个Label正常下的显示时间,第二个Label异步刷新下的显示时间,由Time控件触发,第三个Label是由Button控件触发的显示时间! < br />
< asp:Label ID ="NoUpdatePanel" runat ="server" Text ="Label" ></ asp:Label >
< asp:UpdatePanel ID ="UpdatePanel1" runat ="server" >
< ContentTemplate >
< asp:Label runat ="server" ID ="lblButton" ></ asp:Label >
</ ContentTemplate >
< Triggers >
< asp:AsyncPostBackTrigger ControlID ="Timer1" EventName ="Tick" />
</ Triggers >
</ asp:UpdatePanel >
< asp:Timer ID ="Timer1" runat ="server" Interval ="10000" OnTick ="Timer1_Tick" >
</ asp:Timer >
< asp:Button ID ="Button1" runat ="server" Text ="Button" OnClick ="Button1_Click" />
< asp:UpdatePanel ID ="UpdatePanel2" runat ="server" UpdateMode ="Always" RenderMode ="Block" >
< ContentTemplate >
< asp:Label ID ="lbltime3" runat ="server" ></ asp:Label >
</ ContentTemplate >
< Triggers >
< asp:AsyncPostBackTrigger ControlID ="Button1" EventName ="Click" />
</ Triggers >
</ asp:UpdatePanel >
</ div >
</ form >
</ body >
</ html >
codebehind:
<% @ Register Assembly = " System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "
Namespace = " System.Web.UI " TagPrefix = " asp " %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
< html xmlns ="http://www.w3.org/1999/xhtml" >
< head runat ="server" >
< title > Untitled Page </ title >
</ head >
< body >
< form id ="form1" runat ="server" >
< asp:ScriptManager ID ="ScriptManager1" runat ="server" />
< div >
来到这里先是第一个Label正常下的显示时间,第二个Label异步刷新下的显示时间,由Time控件触发,第三个Label是由Button控件触发的显示时间! < br />
< asp:Label ID ="NoUpdatePanel" runat ="server" Text ="Label" ></ asp:Label >
< asp:UpdatePanel ID ="UpdatePanel1" runat ="server" >
< ContentTemplate >
< asp:Label runat ="server" ID ="lblButton" ></ asp:Label >
</ ContentTemplate >
< Triggers >
< asp:AsyncPostBackTrigger ControlID ="Timer1" EventName ="Tick" />
</ Triggers >
</ asp:UpdatePanel >
< asp:Timer ID ="Timer1" runat ="server" Interval ="10000" OnTick ="Timer1_Tick" >
</ asp:Timer >
< asp:Button ID ="Button1" runat ="server" Text ="Button" OnClick ="Button1_Click" />
< asp:UpdatePanel ID ="UpdatePanel2" runat ="server" UpdateMode ="Always" RenderMode ="Block" >
< ContentTemplate >
< asp:Label ID ="lbltime3" runat ="server" ></ asp:Label >
</ ContentTemplate >
< Triggers >
< asp:AsyncPostBackTrigger ControlID ="Button1" EventName ="Click" />
</ Triggers >
</ asp:UpdatePanel >
</ div >
</ form >
</ body >
</ html >
using
System;
using System.Data;
using System.Configuration;
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;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load( object sender, EventArgs e)
{
this .NoUpdatePanel.Text = DateTime.Now.ToLongTimeString();
}
protected void Timer1_Tick( object sender, EventArgs e)
{
this .NoUpdatePanel.Text = DateTime.Now.ToLongTimeString();
this .lblButton.Text = DateTime.Now.ToLongTimeString();
}
protected void Button1_Click( object sender, EventArgs e)
{
this .lbltime3.Text = DateTime.Now.ToLongTimeString();
}
}
5结束语
using System.Data;
using System.Configuration;
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;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load( object sender, EventArgs e)
{
this .NoUpdatePanel.Text = DateTime.Now.ToLongTimeString();
}
protected void Timer1_Tick( object sender, EventArgs e)
{
this .NoUpdatePanel.Text = DateTime.Now.ToLongTimeString();
this .lblButton.Text = DateTime.Now.ToLongTimeString();
}
protected void Button1_Click( object sender, EventArgs e)
{
this .lbltime3.Text = DateTime.Now.ToLongTimeString();
}
}
asp.net2.0 ajax是一个非常强大的框架,可以让我们轻松的在vs2005上使用ajax开发你的网站,使你的站点有更好的用户体验进入wen2.0时代,其中这个 框架还有很多值得深入挖掘的部分,所以关于这个框架的学习,应用,将会在以后漫漫深入讨论,而本次只是介绍基础,快速开发,提供资料!在这里将记录我学习 asp.net2.0 ajax的足迹!
作者:worksguo(写)