Introduction
This code snippet solves the problem of passing parameters to the callback OnSuccess or onreadystatechange functions used in javascript Ajax with or without Microsoft .Net framework
On many forums people ask how to do that.
SOLUTION CODE
Useful also in Asp.Net Ajax development environments (using integrated Microsoft Ajax).
Easy..
<code>
function yourCallBack(arg1,arg2) {
return function(result) {
alert(arg1);
alert(arg2);
alert(result);
}
}
</code>
Very simple and easy, try it .
Points of Interest
Usefull for some complex scenarios that requires passing variables to the ajax delegate.