.NET Ajax的无刷新技术实例详解
|
源代码网整理以下该开发包的新版本还没有来得及体验,估计新版本中会方便一些,可能会去掉手动的设置Global.asax的Application_Start事件中加上Ajax.Utility.HandlerPath = "ajax";以及其他麻烦的设置。 源代码网整理以下下载一个.net Ajax开发包,该开发包包括ASP2.0和目前ASP1.1版使用的Ajax,详细地址参见http://ajax.schwarz-interactive.de/,接下来,开始。 源代码网整理以下 1. 新建一个项目,在引用中添加引用Ajax.dll,Ajax.dll位于下载的压缩包里面。 源代码网整理以下 2.建立HttpHandler,在web.config里面加上: 源代码网整理以下 源代码网整理以下<configuration> 源代码网整理以下lt; 源代码网整理以下lt; 源代码网整理以下lt; 源代码网整理以下lt; 源代码网整理以下<system.web> 源代码网整理以下lt; 源代码网整理以下 源代码网整理以下 源代码网整理以下using System.Web; 源代码网整理以下namespace AjaxSample 源代码网整理以下{ 源代码网整理以下/**//// <summary> 源代码网整理以下/// Summary description for Methods. 源代码网整理以下/// </summary> 源代码网整理以下ublic class DemoMethods 源代码网整理以下{ 源代码网整理以下[Ajax.AjaxMethod] 源代码网整理以下ublic string GetCustomerMac(string clientIP) |
