Software development stuff.

2009-04-21

Running dynamic javascript generated on the UpdatePanel partial postback

I found this great piece of code that allows a more or less generic way of running javascript generated during the processing of a partial postback within an UpdatePanel.
It runs all the script inside script tags with a certain ID.
http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2008/08/dynamic-javascript-in-update-panel_19.html?showComment=1240338420000#c118959118652221112

Etiquetas: ,

2009-04-17

Stuck with static constructor exception

It took me quite some time to understand why I was getting allways the same exception on a static constructor. So this blog confirmed what I suspected. The exception is cached and thrown again:
http://weblogs.asp.net/avnerk/archive/2008/12/16/static-constructor-throws-the-same-exception-again-and-again.aspx
I found this with .NET2.0 I believe .NET 3.5 works differently since they added this to the documentation:
"If a static constructor throws an exception, the runtime will not invoke it a second time, and the type will remain uninitialized for the lifetime of the application domain in which your program is running"