AJAX/VS2005-ajax+vs2005新特色
关注ajax(Asynchronous JavaScript and XML) 好长时间了,现在vs2005也正式发布了
vs2005上的新特性无刷新技术是用到了ajax ,ajax 看来要在vs2005上放光异彩了.
看看官方的介绍
AJAX (Asynchronous JavaScript and XML) describes a cross-platform, client-centric approach to developing Web applications. In AJAX, developers use client scripts to make asynchronous calls to Web server applications using an XML-based protocol. The new ASP.NET technology code-named "Atlas" is a package of Microsoft technologies that applies and extends the AJAX approach. This topic describes the Web application development issues that AJAX addresses, explains the basic concepts of AJAX, and introduces ASP.NET "Atlas" as a significant evolution and enhancement of the AJAX approach.
无刷新应用很广泛,就不多说了
贴个小代码:
function up_load(msg)
{
if (window.XMLHttpRequest)
{
req = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.onreadystatechange = processChech;
req.open( "post", "up_load_checktable.aspx",false);
req.send();
}
function processChech()
{
if (req.readyState == 4)
{
var content = document.getElementById("pub");
if (req.status == 200)
{
content.innerHTML = req.responseText;
}
else
{
content.innnerText = "操作失败!";
}
}
}
以上是个简单的应用,其实vs2005 AJAX就是封装了这些东西,成了一个框架,可以调用
可以应用在web services ,按钮的事件上,form 的提交上等等
ajax+vs2005学习资料网址:
http://msdn.microsoft.com/asp.net/info/future/
http://atlas.asp.net/quickstart/default.aspx
http://atlas.asp.net/quickstart/default.aspx
vs2005 beta 2 没有装 web site 工程 asp.net atlas web site 的 template
需要下载ASPNETAtlas.vsi.zip ,里面有个ASPNETAtlas.vscontent 双击即可执行,vs2003 下无法执行的
ASP.NET AJAX
Microsoft ASP.NET AJAX Introduction
http://ajax.asp.net/docs/default.aspx
Microsoft ASP.NET AJAX documentation includes overviews, tutorials, and API reference topics. We suggest the following progression of documentation to help you to get started.
AJAX : The Official Microsoft ASP.NET AJAX Site
http://ajax.asp.net/
ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers.
ASP.NET AJAX Download: http://ajax.asp.net/downloads/default.aspx?tabid=47