admin管理员组

文章数量:1336148

I need to add to my C# web project a JS library, but i still don`t get how to do it. There is no such library in the built-in Nuget Package manager. Thanks for any help ;)

I need to add to my C# web project a JS library, but i still don`t get how to do it. There is no such library in the built-in Nuget Package manager. Thanks for any help ;)

Share Improve this question edited Jun 28, 2016 at 19:14 Daniel A. White 191k49 gold badges379 silver badges465 bronze badges asked Jun 28, 2016 at 19:11 StrixenStrixen 331 silver badge3 bronze badges 2
  • JavaScript libraries are generally just files: download the file and put it in your project. Or use a client side package manager, ex Bower. Or reference it from the CDN it's hosted on. – mason Commented Jun 28, 2016 at 19:14
  • "C# Web project" is quite a broad label that enpasses ASP.NET Web Forms, ASP.NET MVC, ASP.NET Web API, etc. – Heretic Monkey Commented Jun 28, 2016 at 19:19
Add a ment  | 

1 Answer 1

Reset to default 6

Download the file and then just copy/paste the *.js file in your project and take a reference of it in your design page *.aspx (for ASP.NET) or *.cshtml (for ASP.NET MVC) saying

<script src="~/filename.js"></script>

本文标签: javascriptAdd js library to visual studio projectStack Overflow