我想在我的母版页中使用 ScriptManager 和 CompositeScript 组件来包含站点范围的 javascript,但在我的“Web 内容表单”中添加到该列表中。我确信这可以在代码隐藏中完成,但最好我想在标记中完成。这种事情可以做吗?
在:MasterPage.master
<asp:ScriptManager ID="ScriptManager" runat="server" EnableScriptCombine="True">
<CompositeScript>
<Scripts>
<asp:ScriptReference name="" Assembly="" Path="/client/js/main.js"/>
</Scripts>
</CompositeScript>
</asp:ScriptManager>
在:内容.aspx
<asp:ScriptReference name="" Assembly="" Path="/client/js/other.js"/>