How do I use Microsoft.jQuery.Unobtrusive.Ajax with libman (Library manager) asp.net Core 2.1?
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
I am trying to use unobtrusive ajax to update my partial views. Unfortunately I ran in to a problem when I was about to install the package, since Bower is not working (?) or recommended anymore according to https://docs.microsoft.com/en-us/aspnet/core/client-side/bower?view=aspnetcore-2.1. Instead they recommend us to use Libman.
I followed the steps from https://www.c-sharpcorner.com/article/unobtrusive-ajax-and-jquery-for-partial-updates-in-asp-net-mvc/.
So I have installed the nuget Microsoft.jQuery.Unobtrusive.Ajax-package, but how do I reference the ajax-package with libman?
I looked at this How to reference Microsoft.JQuery.Unobtrusive.Ajax within my ASP.NET Core MVC project answer but it only shows how to use Bower.
c# jquery ajax asp.net-core asp.net-core-mvc
add a comment |Â
up vote
6
down vote
favorite
I am trying to use unobtrusive ajax to update my partial views. Unfortunately I ran in to a problem when I was about to install the package, since Bower is not working (?) or recommended anymore according to https://docs.microsoft.com/en-us/aspnet/core/client-side/bower?view=aspnetcore-2.1. Instead they recommend us to use Libman.
I followed the steps from https://www.c-sharpcorner.com/article/unobtrusive-ajax-and-jquery-for-partial-updates-in-asp-net-mvc/.
So I have installed the nuget Microsoft.jQuery.Unobtrusive.Ajax-package, but how do I reference the ajax-package with libman?
I looked at this How to reference Microsoft.JQuery.Unobtrusive.Ajax within my ASP.NET Core MVC project answer but it only shows how to use Bower.
c# jquery ajax asp.net-core asp.net-core-mvc
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
I am trying to use unobtrusive ajax to update my partial views. Unfortunately I ran in to a problem when I was about to install the package, since Bower is not working (?) or recommended anymore according to https://docs.microsoft.com/en-us/aspnet/core/client-side/bower?view=aspnetcore-2.1. Instead they recommend us to use Libman.
I followed the steps from https://www.c-sharpcorner.com/article/unobtrusive-ajax-and-jquery-for-partial-updates-in-asp-net-mvc/.
So I have installed the nuget Microsoft.jQuery.Unobtrusive.Ajax-package, but how do I reference the ajax-package with libman?
I looked at this How to reference Microsoft.JQuery.Unobtrusive.Ajax within my ASP.NET Core MVC project answer but it only shows how to use Bower.
c# jquery ajax asp.net-core asp.net-core-mvc
I am trying to use unobtrusive ajax to update my partial views. Unfortunately I ran in to a problem when I was about to install the package, since Bower is not working (?) or recommended anymore according to https://docs.microsoft.com/en-us/aspnet/core/client-side/bower?view=aspnetcore-2.1. Instead they recommend us to use Libman.
I followed the steps from https://www.c-sharpcorner.com/article/unobtrusive-ajax-and-jquery-for-partial-updates-in-asp-net-mvc/.
So I have installed the nuget Microsoft.jQuery.Unobtrusive.Ajax-package, but how do I reference the ajax-package with libman?
I looked at this How to reference Microsoft.JQuery.Unobtrusive.Ajax within my ASP.NET Core MVC project answer but it only shows how to use Bower.
c# jquery ajax asp.net-core asp.net-core-mvc
edited Aug 30 at 8:15


mybirthname
15k32042
15k32042
asked Aug 30 at 7:28
Erik Sellberg
211418
211418
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
You could use npm. Add pakage.json file in the root of your web project
"version": "1.0.0",
"name": "your-system",
"devDependencies":
"jquery-ajax-unobtrusive": "^3.2.4"
,
"exclude": [
]
Now everything related to the library will be automatically downloaded in node_modules/jquery-validation-unobtrusive
.
Be aware the node_module folder is not part of the project so you need to click Show All Files
to see all folders.
After that if you want to always have latest version of the library instead of copying the file to your js folder you could use bundle config. Run this:
Install-Package BuildBundlerMinifier -Version 2.8.391
After that create json file - bundleconfig.json
in the root of your web project
[
"outputFileName": "wwwroot/js/myjs.min.js",
"inputFiles": [
"node_modules/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"
]
]
This will create on every build myjs.min.js
file in your js folder in wwwroot
add a comment |Â
up vote
1
down vote
The answer by @mybirthname is great . Another way to do that is to use libman cli . We can use the following command to install the libman :
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
And now you can install jquery , jquery-validation-unobtrusive and so on as you like :
to init a libman.json
:
libman init
to install a dependency of jquery-validation-unobtrusive
:
> libman install jquery-validation-unobtrusive
Destination [libjquery-validation-unobtrusive]:
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js written to disk
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js written to disk
Installed library "jquery-validation-unobtrusive@3.2.10" to "libjquery-validation-unobtrusive"
to install a depenency of jquery
:
> libman install jquery
Destination [libjquery]:
lib/jquery/core.js written to disk
lib/jquery/jquery.js written to disk
lib/jquery/jquery.min.js written to disk
lib/jquery/jquery.min.map written to disk
lib/jquery/jquery.slim.js written to disk
lib/jquery/jquery.slim.min.js written to disk
lib/jquery/jquery.slim.min.map written to disk
Installed library "jquery@3.3.1" to "libjquery"
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
You could use npm. Add pakage.json file in the root of your web project
"version": "1.0.0",
"name": "your-system",
"devDependencies":
"jquery-ajax-unobtrusive": "^3.2.4"
,
"exclude": [
]
Now everything related to the library will be automatically downloaded in node_modules/jquery-validation-unobtrusive
.
Be aware the node_module folder is not part of the project so you need to click Show All Files
to see all folders.
After that if you want to always have latest version of the library instead of copying the file to your js folder you could use bundle config. Run this:
Install-Package BuildBundlerMinifier -Version 2.8.391
After that create json file - bundleconfig.json
in the root of your web project
[
"outputFileName": "wwwroot/js/myjs.min.js",
"inputFiles": [
"node_modules/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"
]
]
This will create on every build myjs.min.js
file in your js folder in wwwroot
add a comment |Â
up vote
4
down vote
accepted
You could use npm. Add pakage.json file in the root of your web project
"version": "1.0.0",
"name": "your-system",
"devDependencies":
"jquery-ajax-unobtrusive": "^3.2.4"
,
"exclude": [
]
Now everything related to the library will be automatically downloaded in node_modules/jquery-validation-unobtrusive
.
Be aware the node_module folder is not part of the project so you need to click Show All Files
to see all folders.
After that if you want to always have latest version of the library instead of copying the file to your js folder you could use bundle config. Run this:
Install-Package BuildBundlerMinifier -Version 2.8.391
After that create json file - bundleconfig.json
in the root of your web project
[
"outputFileName": "wwwroot/js/myjs.min.js",
"inputFiles": [
"node_modules/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"
]
]
This will create on every build myjs.min.js
file in your js folder in wwwroot
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
You could use npm. Add pakage.json file in the root of your web project
"version": "1.0.0",
"name": "your-system",
"devDependencies":
"jquery-ajax-unobtrusive": "^3.2.4"
,
"exclude": [
]
Now everything related to the library will be automatically downloaded in node_modules/jquery-validation-unobtrusive
.
Be aware the node_module folder is not part of the project so you need to click Show All Files
to see all folders.
After that if you want to always have latest version of the library instead of copying the file to your js folder you could use bundle config. Run this:
Install-Package BuildBundlerMinifier -Version 2.8.391
After that create json file - bundleconfig.json
in the root of your web project
[
"outputFileName": "wwwroot/js/myjs.min.js",
"inputFiles": [
"node_modules/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"
]
]
This will create on every build myjs.min.js
file in your js folder in wwwroot
You could use npm. Add pakage.json file in the root of your web project
"version": "1.0.0",
"name": "your-system",
"devDependencies":
"jquery-ajax-unobtrusive": "^3.2.4"
,
"exclude": [
]
Now everything related to the library will be automatically downloaded in node_modules/jquery-validation-unobtrusive
.
Be aware the node_module folder is not part of the project so you need to click Show All Files
to see all folders.
After that if you want to always have latest version of the library instead of copying the file to your js folder you could use bundle config. Run this:
Install-Package BuildBundlerMinifier -Version 2.8.391
After that create json file - bundleconfig.json
in the root of your web project
[
"outputFileName": "wwwroot/js/myjs.min.js",
"inputFiles": [
"node_modules/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"
]
]
This will create on every build myjs.min.js
file in your js folder in wwwroot
edited Aug 30 at 8:14
answered Aug 30 at 8:02


mybirthname
15k32042
15k32042
add a comment |Â
add a comment |Â
up vote
1
down vote
The answer by @mybirthname is great . Another way to do that is to use libman cli . We can use the following command to install the libman :
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
And now you can install jquery , jquery-validation-unobtrusive and so on as you like :
to init a libman.json
:
libman init
to install a dependency of jquery-validation-unobtrusive
:
> libman install jquery-validation-unobtrusive
Destination [libjquery-validation-unobtrusive]:
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js written to disk
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js written to disk
Installed library "jquery-validation-unobtrusive@3.2.10" to "libjquery-validation-unobtrusive"
to install a depenency of jquery
:
> libman install jquery
Destination [libjquery]:
lib/jquery/core.js written to disk
lib/jquery/jquery.js written to disk
lib/jquery/jquery.min.js written to disk
lib/jquery/jquery.min.map written to disk
lib/jquery/jquery.slim.js written to disk
lib/jquery/jquery.slim.min.js written to disk
lib/jquery/jquery.slim.min.map written to disk
Installed library "jquery@3.3.1" to "libjquery"
add a comment |Â
up vote
1
down vote
The answer by @mybirthname is great . Another way to do that is to use libman cli . We can use the following command to install the libman :
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
And now you can install jquery , jquery-validation-unobtrusive and so on as you like :
to init a libman.json
:
libman init
to install a dependency of jquery-validation-unobtrusive
:
> libman install jquery-validation-unobtrusive
Destination [libjquery-validation-unobtrusive]:
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js written to disk
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js written to disk
Installed library "jquery-validation-unobtrusive@3.2.10" to "libjquery-validation-unobtrusive"
to install a depenency of jquery
:
> libman install jquery
Destination [libjquery]:
lib/jquery/core.js written to disk
lib/jquery/jquery.js written to disk
lib/jquery/jquery.min.js written to disk
lib/jquery/jquery.min.map written to disk
lib/jquery/jquery.slim.js written to disk
lib/jquery/jquery.slim.min.js written to disk
lib/jquery/jquery.slim.min.map written to disk
Installed library "jquery@3.3.1" to "libjquery"
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The answer by @mybirthname is great . Another way to do that is to use libman cli . We can use the following command to install the libman :
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
And now you can install jquery , jquery-validation-unobtrusive and so on as you like :
to init a libman.json
:
libman init
to install a dependency of jquery-validation-unobtrusive
:
> libman install jquery-validation-unobtrusive
Destination [libjquery-validation-unobtrusive]:
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js written to disk
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js written to disk
Installed library "jquery-validation-unobtrusive@3.2.10" to "libjquery-validation-unobtrusive"
to install a depenency of jquery
:
> libman install jquery
Destination [libjquery]:
lib/jquery/core.js written to disk
lib/jquery/jquery.js written to disk
lib/jquery/jquery.min.js written to disk
lib/jquery/jquery.min.map written to disk
lib/jquery/jquery.slim.js written to disk
lib/jquery/jquery.slim.min.js written to disk
lib/jquery/jquery.slim.min.map written to disk
Installed library "jquery@3.3.1" to "libjquery"
The answer by @mybirthname is great . Another way to do that is to use libman cli . We can use the following command to install the libman :
dotnet tool install --global Microsoft.Web.LibraryManager.Cli
And now you can install jquery , jquery-validation-unobtrusive and so on as you like :
to init a libman.json
:
libman init
to install a dependency of jquery-validation-unobtrusive
:
> libman install jquery-validation-unobtrusive
Destination [libjquery-validation-unobtrusive]:
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js written to disk
lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js written to disk
Installed library "jquery-validation-unobtrusive@3.2.10" to "libjquery-validation-unobtrusive"
to install a depenency of jquery
:
> libman install jquery
Destination [libjquery]:
lib/jquery/core.js written to disk
lib/jquery/jquery.js written to disk
lib/jquery/jquery.min.js written to disk
lib/jquery/jquery.min.map written to disk
lib/jquery/jquery.slim.js written to disk
lib/jquery/jquery.slim.min.js written to disk
lib/jquery/jquery.slim.min.map written to disk
Installed library "jquery@3.3.1" to "libjquery"
answered Aug 30 at 8:51
itminus
5968
5968
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52091425%2fhow-do-i-use-microsoft-jquery-unobtrusive-ajax-with-libman-library-manager-asp%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password