642
技術社區[雲棲]
AJAX/VS2005-ajax+vs2005新特色
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學習資料網址:
https://msdn.microsoft.com/asp.net/info/future/
https://atlas.asp.net/quickstart/default.aspx
https://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
https://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
https://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: https://ajax.asp.net/downloads/default.aspx?tabid=47
最後更新:2017-04-02 00:06:24