4

有没有人有过同时使用这两种技术的经验?让两者合作的主要困难是什么(如果有的话)?使用这些技术的站点与使用 Ajax 的普通 ASP.NET Web 应用程序有何不同?

谢谢!

4

4 回答 4

11

是的,他们一起工作得很好。

唯一需要注意的是,如果您在 Master 上有一个 ScriptManager,则不能在内容页面中声明另一个。

如果您想通过内容页面上的 ScriptManager 注册脚本和服务,则需要使用ScriptManagerProxy控件。它是专为 Master/Content 场景设计的控件。

于 2009-01-06T13:43:11.090 回答
2

我一起使用母版页和 ASP.NET AJAX 没有问题。您可以在内容占位符上使用脚本管理器,也可以在母版页中使用单个脚本管理器,但是您必须记住在内容区域中使用 ScriptManagerProxy 以获得正确的功能。

于 2009-01-06T13:52:07.280 回答
1

它取决于你在谈论什么 Ajax 框架,对于 ASP.NET AJAX,你需要弄乱 ScriptManager(Proxy) 这使它有点复杂,但不是那么困难......

Ra-Ajax示例大多都使用 MasterPages,无需摆弄 ScriptManager 或 ScriptManagerProxy。但是 Ra-Ajax 建立在与 ASP.NET AJAX 完全不同的架构上......

顺便说一句,我与 Ra-Ajax 合作,很难被定义为“中立”......

于 2009-01-06T13:59:09.263 回答
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.

于 2009-01-06T14:55:08.793 回答