Do Ajax and ASP.NET MasterPages mix?
Asked Answered
M

4

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!

Monody answered 6/1, 2009 at 13:39 Comment(0)
U
11

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.

Unbraid answered 6/1, 2009 at 13:43 Comment(1)
This post is pretty much everything you'll need to know.Epitome
P
2

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.

Phyllotaxis answered 6/1, 2009 at 13:52 Comment(0)
A
1

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"...

Amoreta answered 6/1, 2009 at 13:59 Comment(0)
P
0

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.

Puzzlement answered 6/1, 2009 at 14:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.