asp.net [AjaxMethod]

时间:2021-07-28 14:50:55

AjaxPro.2.dll

cs 代码

using AjaxPro;

Utility.RegisterTypeForAjax(typeof(BOMdr_KT));

[Ajax.AjaxMethod()]

public string GetAddress(string UserID)

{ string Address=""; //do somthing to get the address here return Address; }

确保页面中有<form runat="server"></form>标签

web.config

<httpHandlers>

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

http://www.jb51.net/article/28520.htm  参考