These days we use Ajax technologies in every page for the faster action, to make network traffic less, to refresh the needed parts of the page. We are using Ajax in .net, html, php, java etc.. Among this we are using AjaxPro which is also ajax, but here the codes are precompiled into dll file. Just we have to use this AjaxPro.
Why we have to use AjaxPro?
There are two methods by which we can use this AjaxPro.
Now lets have a look at the second method:
- First we have to place AjaxPro2.dll and its refresh file in the bin folder.
- In webconfig file add the following code , inside the
from appcode and function from the appcode class file as ajax.add(name).
here ajax is the class file and add is the function and pass the parameters.
- In codebehind of aspx page add “using System.Text;” & “using AjaxPro”
- Call the appcode class file as normally in the apsx code behind file.
- In page_load event of the aspx page code behind insert the following code :
AjaxPro.Utility.RegisterTypeForAjax(typeof(ajax));Here “ajax” is the appcode classfile name where the corresponding stored
procedures are there.
- In appcode class file add” using AjaxPro” namespace.
- On top of each function in classfile add [AjaxMethod] sentence.