I am using the Elastic CSS framework on an ASP.NET site. It is doing a great job of sizing the various containers I have until an UpdatePanel executes a partial postback. The solution as I understand it is to execute the following line of javascript
Elastic.refresh();
I’m pretty good with C# and ASP.NET but not so much with javascript. As I understand it, RegisterStartupScript only registers the script, I still need a control to then execute it.
So how can I get this one line of javascript to execute when a custom control catches a custom exception and causes a partial postback?
Edit
In javascript on your page you could also try something like this
This handler will run after any callback but
sender._postBackSettings.panelIDwill allow you to filter it to the panel you want.Alternativly you could try if end request fits your needs better.
Original
Do you have a ScriptManager control on the page that has the UpdatePanel? If so you might be able to leverage the ScriptManager.AsyncPostBackError and have it execute your method.
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.asyncpostbackerror.aspx