AbstractIn this article, Muhammad examines how to accomplish JavaScript Serialization using ICallback and JSON. He begins with a basic introduction to ICallback, ICallbackEventHandler interface, and JSON. He then delves deep into the implementation of both server and client side ICallback with the help of associated source code.

While working in ASP.NET, sometimes we need to call server
side methods asynchronously without having a postback. Sometimes it is either a
full page postback or partial page postback. But thanks to the ASP.NET team, we
are provided implementation of ICallback very easily.

ICallback

ICallback is lightweight process. It uses well known XMLHTTP
object internally to call server side method. It does not cause page postback
and does not cause page rendering. If we are to show output at the client side,
we need to make output HTML ourselves and render the controls manually.

ICallbackEventHandler

ICallback is implemented in ASP.NET by using ICallbackEventHandler
interface. It has two methods; one of them is used to call from JavaScript
(client side code) and other one returns the result asynchronously back to the JavaScript
function.

We just need to perform some action through server side code
at server side. It then needs to return the results, but results are in
instance or object of any class which would not be easy for JavaScript code to
handle. Here we prefer JSON which stands for JavaScript Object Notation.

Title:
Problem in JQuery autocomplete with asp.net callback using ICallbackEventHandler
Name:
Anuj Rathi
Date:
2012-06-30 10:19:21 PM
Comment: Hi,I also love ICallback feature of .net & I always use it instead of other Ajax call. I am facing a problem with jquery autocomplete when I use Callback.

Please have a look below post:http://forums.asp.net/t/1802972.aspx/1?Problem+in+JQuery+autocomplete+with+asp+net+callback+using+ICallbackEventHandler

Title:
Superb
Name:
Mustafa
Date:
2011-07-07 6:28:18 AM
Comment: Thingking in C++ (OOP), Web Applications has been tough for me. Thanks you made it quite easy to digest.Just a question (I am new to Javascript), How do I convert{"Name":"Muhammad Adnan","Age":24} back to Javascript structure so I can access it like this, var strName = arg["Name"]?

@Muhammad Adnan I have corrected the code in Listing 3. Please make sure everything is correct now. Have a great day.

Title:
Re: cm object?
Name:
Author (Muhammad Adnan)
Date:
2008-04-09 9:25:45 AM
Comment: sorry its my mistake.it should be scriptMgr rather than cm and should be like thisscriptMgr.RegisterClientScriptBlock(this.GetType(),"CallServer", callbackScript, true);

thanks for pointing out and being cause of correction.

Title:
cm object?
Name:
jeff
Date:
2008-04-09 7:12:06 AM
Comment: In the Page_Load of your sample you call RegisterClientScriptBlock from an object called "cm". Where does that object come from?Thanks.

Title:
RE: Gorhal
Name:
Author
Date:
2008-03-16 1:58:34 PM
Comment: what if you have to call method of you page class or any class which is not web service class :) and sometimes clients doesn't feel confident about to use any third party library (i mean JAYROCK) then what? :)

anyhow approaches are 1000000000. i tried to cover up few things like callback, json, javascript serialization in simple and basic manner.

i hope if u look in that way u will feel it better

thanks :)

Title:
Re: S.Aprelov , Brandon M. Hunter
Name:
Author
Date:
2008-03-16 1:44:46 PM
Comment: for more details about callback and for having more better real time example i would prefer you to look at my another article on this link http://aspalliance.com/1537

hope you find that more appropriate. thanks,

Title:
Good Article
Name:
Brandon M. Hunter
Date:
2008-03-16 7:36:50 AM
Comment: Good Article, but I agree with S.Aprelov, I would like to see more "real world" examples, but overall its a good article.

Title:
Re: Good but not so
Name:
Muhammad Adnan (Author)
Date:
2008-03-13 1:29:01 AM
Comment: Thanks for your feedback. Actually, everything couldn't be clear about any topic in a single article. For more details on this topic with different scenario, i would like to refer you to next version of this article which is posted on following link http://aspalliance.com/1573 i hope you find that in more detail

best regards,

Title:
Good but not so
Name:
Bobo
Date:
2008-03-12 10:38:11 PM
Comment: Good article,but not so clear and detailed. More is required.

Title:
Call back use
Name:
M Nadeem
Date:
2008-01-08 4:40:52 AM
Comment: Its a nice article to use JSON with asp.net the use of AJAX technology. It simple, short and comprehensive article for understanding. I wanna say thanks to adnan because i got the great vision of AJAX in this article in very short time and i can refer to my other friends as well to tell them about this functionality in very short manner.

Regards,

M Nadeem

Title:
Good Article
Name:
Kauser
Date:
2008-01-08 3:34:12 AM
Comment: I read this article and I feel that its quite informative and easy to understand. I really like your way of writing. Good Effort!

Title:
gr8 article
Name:
John
Date:
2008-01-08 2:37:57 AM
Comment: by this article i get to know many new things like callback, json, js serialization which i never even bother and now i have plenty of places where i could utlize it. keep it up man :)