p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 2.0 AJAX ISBN: 978-0-470-10962-5 (http://p2p.wrox.com/forumdisplay.php?f=340)
-   -   Custom controls and callback (http://p2p.wrox.com/showthread.php?t=61556)

PatrickRuzand August 28th, 2007 10:20 AM

Custom controls and callback

first, congrats for your great book, a very valuable resource for all ASP.NET dev IMO.

However, there is one thing that is missing, the answer to my question :-)
As an ASP.NET control developer, I am particularly interested in how custom control can benefit from the ASP.NET AJAX async communication layer. Indeed, the recommended way to perform asynchronous request for a custom control was to use the ICallbackEventHandler interface coupled with the GetCallbackEventReference mechanism. This solution works nicely and is guaranteed to be executed in the ASP.NET lifecycle.
On the other side, ASP.NET AJAX provides the Sys.Net.WebRequest solution. After having read the corresponding chapter in your book, I think I understand the benefit for a Page developer (Page Methods and Web Services proxies), but I am not sure about the interest for a Control developer. Let's take an example. I have developped an ExtenderControl that needs to perform some tasks asynchronously on the server. What I did is my ExtenderControl subclass implements ICallbackEventHandler to process the callback and send the result back to the behavior. Would there be another possible implementation using the WebRequest object ?
And from a more general view, is there a guideline telling when to use the WebRequest and when to use the ICallbackEventHandler ?

I would be very interesting in knowing your opinion about that.



All times are GMT -4. The time now is 06:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.