简体   繁体   中英

Adding jQuery UI with NuGet

I'm trying to get jQuery UI working in my Web Forms 4.5 C# project. What I've done is install it through the NuGet manager without any errors. But when adding the ScriptReference in my Site.Master i just get the following error:

jquery.ui.combined is not a valid scriptname (translated from Swedish).

The code I'm adding to my masterpage is

<asp:ScriptReference Name="jquery.ui.combined" />

As far as I have understood it this is how I am supposed to to if I want to add jQuery UI, but it's not working. What am I doing wrong?

In the NuGet download page, search for the AspNet.ScriptManager.jQuery.UI.Combined package. This will install the package and you will be able to reference it as "jquery.ui.combined"

See this MSDN link for a list of stable NuGet packages.

In your master page, why don't you just reference your script using the standard script tag? http://www.w3schools.com/tags/att_script_src.asp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM