How to post to update panel and redeploy your response data

I applied the save-draft trick with the update panel where I handle the asynch updatepanel postback on the server side and then to avoid sending the same html data I throw an exception with the current datetime message as a post and then commit it to the client where I do some transformations and html injections so that the user knows that the project of his current work has been saved (TERRIBLE!).

The original idea was to handle the asynch postback and then override the update bar render method to send xml or javascript data that could be captured and processed on the client side, stopping the update of the updatable update bars.

Has anyone tried this kind of functionality with update panels?

0


source to share


1 answer


I don't think UpdatePanel is really what you want here. If you want to get the response back and have better control over the response, you should look at standard AJAX requests.

UpdatePanel is not something that you can actually control the response about all of this, you can wire yourself to an event handler endRequest

on PageRequestManager

, there you can check for respose. Here's the details about the eventArgs you're returning - http://msdn.microsoft.com/en-au/library/bb384175.aspx



But throwing an exception is not a good idea, because nothing exceptional happened , which is an exception;)

+1


source







All Articles