I am developing a WebPart (it will be used in a SharePoint environment, although it does not use the Object Model) that I want to expose AJAX functionality in. Because of t
I had this similar problem and found the best way was to add a global ScriptManager to the masterpage then in the code behind you can add to it by:
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference(virtualPath));