Some Tips From Atlas To Microsoft Ajax RC1

Monday, December 18, 2006

These days I am busy on move a old atlas application to newer Microsoft Ajax RC1. During This process I encountered some problem and get some tips.

1. Trigger.ControlEventName in UpdatePanel are modified to Trigger.AsyncPostBackTrigger. I think this is more meanningful. it also add  PostBackTrigger propery to force control refresh in updatepanel.

2. $ changed to $get which is short of Document.GetElementByID in order to conflict to other ajax library such as prototype. Add shortcut $addHandler to listen event of control in client script

3. Page.RegisterStarupScript is moved to System.Web.UI.ScriptManager.RegisterStartupScript. The function add a paremeter of Control.

4. The biggest change affected me is PageMothods which I used to communicate between javascript and server code. Now It must be public and static. In former application I use lot' of un-static method in it. I could not change all of these function to static. so I use RegisterStarupScript  instead of it to pass server data to javascript.