posted on Monday, October 25, 2004 9:02 PM
by
Saravana
Client Callback in ASP.NET Whidbey
I am working on ASP.NET 2.0 new features for the past one month. Last week i tried out Client Callbacks feature in ASP.NET Whidbey. This feature allows client script to call server side event asynchronously.
In most of the application we require this feature for posting some data to server without doing page refresh. Even for doing server side validation we can use this feature extensively. This feature is just wrapper over XMLHttp which we used previously to do asynchronous post. In my previous project, we extensively used XMLHttp Post. Now we no need to code for this, all this work will be done by Call back manager we just need to use this framework. Other advantage of this feature is, it is cross browser friendly. It will work both in Netscape and IE (of course it has to work here...). Basically it will work in all the browser which supports XMLHttp. To know more about client call back, read my
article.
If you check out WebForm_DoCallback javascript function in script returned by webresource.axd handler, you can find out the client script for XML Http work. It neatly decides whether it wants to do post or get depending upon posted data size. My only concern is that, it posts the viewstate data also along with other posted data to callback page. I feel most of the time we might not require posted data(especially viewstate) as we are passing necessary information to call back page through argument parameter. So i feel there should be some way to avoid passing viewstate to call back page. I am working on this, will update about this issue in detail in next post.