三步搞定AjaxPro.2

1.web.config

< httpHandlers >
      
< add path = " */ajaxpro/*.ashx "  verb = " * "  type = " AjaxPro.AjaxHandlerFactory, AjaxPro.2 " />
</ httpHandlers >

2.page code-behinde: 后台注册
AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClassName));
3.page:页面调用
   var result = AjaxClassName.GetData();
   if(result.error == null)
  {
     $("#div_content").html(result.value);
  }
  else
  {
     $("#div_content").html(result.message);
   }

你可能感兴趣的:(Ajax)