开发者

How to add To Script Manager reference to MS CDN JQuery

开发者 https://www.devze.com 2023-02-20 17:23 出处:网络
I use C# and ASP.Net 4. I have a Master Page, inside a Script Manager with EnableCdn=\"True\" so I can load automatically all ASP.NET Ajax Library from MS CDN Servers.

I use C# and ASP.Net 4. I have a Master Page, inside a Script Manager with EnableCdn="True" so I can load automatically all ASP.NET Ajax Library from MS CDN Servers.

<asp:ScriptManager ID="uxScriptManagerMasterPage" runat="server" 
        EnableCdn="True">
    </asp:ScriptManager>

I need also to include in my Master Page JQuery library. At the moment I'm using the following element in the Header of the page:

<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script>

I would like to know if there is any properierty for ScriptManager that would allow me to load all Ms Ajax library plus Jquery from MS开发者_运维技巧 CDN using ScriptManager.

I had a look at CdnPath property but I'm not able to make it work.

DO you have any ideas? Are you able to provide me a sample of code? thanks


The ScriptResourceMapping section of this Asp.Net 4.0 ScriptManager improvements post shows a solution for this problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消