views:

953

answers:

4

Has anyone had experience using these two technologies in tandem? What are (if any) the major difficulties in getting the two to cooperate? How would a site using these technologies be different than a normal ASP.NET Web Application with Ajax?

Thanks!

+10  A: 

Yes, they work well together.

The only thing to watch out for is if you have a ScriptManager on the Master, you can't declare another in Content pages.

If you want to register scripts and services through the ScriptManager on Content pages, you'll need to use a ScriptManagerProxy control instead. It's a control specifically designed for the Master/Content scenario.

Dave Ward
This post is pretty much everything you'll need to know.
tom.dietrich
+1 for ScriptManager/ScriptManagerProxy
etsuba
+2  A: 

I've used Master Pages and ASP.NET AJAX together without issues. You can either use the script manager on your content placeholders or use a single scriptmanager in your master page, but then you have to remember to use the ScriptManagerProxy in the content areas to get the proper functionality.

TheTXI
+1  A: 

IT depends on what Ajax Framework you're talking about, for ASP.NET AJAX you need to mess around with ScriptManager(Proxy) which complicates it a little bit, but not so that it's very difficult...

The samples of Ra-Ajax are mostly all using MasterPages, without the needs to fiddle around with ScriptManager or ScriptManagerProxy. But Ra-Ajax builds on a completely different architecture then ASP.NET AJAX...

BTW, I work with Ra-Ajax and can hardly be defined as "neutral"...

Thomas Hansen
A: 

In addition to declaring the ScriptManager on the Master Page and ScriptManagerProxy on the content pages, it is a good practice to put all the JavaScript files in a separate dll so you have all your resources separate from the rest of the project. Having separate debug and release versions (with white spaces removed) of the Javascript files gives you a good performance boost.

etsuba