Thursday, August 23, 2007

Using AjaxPro2.dll from Michael Schwarz

*Add web Config
inside configuration/configSections


inside configuration/system.web/httpHandlers



*add reference AjaxPro2.dll into the bin folder
using AjaxPro;

* in page load (postback and not) - add Utility.RegisterTypeForAjax(typeof(_Default));

*
On client ajax method add attribute
[AjaxMethod(HttpSessionStateRequirement.ReadWrite)] public string MyAjaxMethod(string username)
{
return "Halo" + UserName;
}


*call in client javascript
_Default.MyAjaxMethod("Kurniawan").value


No comments: