Sunday, June 1, 2008

ASP.NET AJAX Internals

From: Desert Code Camp 2008
Speaker: Rob Paveza (from Teralever)


Script# - This is a C# to Javascript compiler. Instead of generating IL code like the C# compiler normally would it generates javascript. I believe that it's written by Nikhil Kothari.

WebService calls can be made from the UpdatePanel which has the advantage of reducing the viewstate. These calls can be made static.

If using the Telerik controls then watch out for a conflict between them and ASP.NET Ajax as there are some incompatibilities.

Mootools and Prototype are Ajax toolkits. (I get the impression that Mootools is commercial and Prototype is free open source.)

To use a WebService call in Ajax you need to decorate the call with the [ScriptService] and [ScriptMethod] attributes.

If you put the ScriptManager reference (required for all ASP.NET Ajax pages) on a master page then you need to use a ScriptManagerProxy reference in the control that you're building. There are a number of arguments (attributes) that can be given to ScriptManager that I haven't used before that need further investigating.

The EnablePageMethods=true is a ScriptManager attribute that makes the page act like a web service.


  1. Mootools is definitely free and open source :)

  2. Thanks for the update Charles.