Microsoft.jQuery.Unobtrusive.Ajax Impossible to install
I am very simply just trying to use the Microsoft.jQuery.Unobtrusive.Ajax
library to post ajax razor forms, but for some reason I can't get the package to install properly.
I tried installing it from the Nuget Package Manager, and I can see it in my dependancies:
But there is not folder for it under lib
So next, I tried right-clicking the project and managing bower package, and can now see in bower.json
:
"Microsoft.jQuery.Unobtrusive.Ajax": "^3.2.3"
However, the library is still not present in libs
, and when I try posting my ajax form (which i copied from here) the form is posted normally nad not 'ajax'-lly (i.e. I am redirected to the page rather than the data just posting asynchronously).
Form
<form method="post" data-ajax="true" data-ajax-method="post" data-ajax-complete="complete" enctype="multipart/form-data">
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-default">
Browse… <input asp-for="Uploads" type="file" style="display: none;" accept=".xls,.xlsx,.csv" multiple>
</span>
</label>
<input type="text" class="form-control" readonly>
</div>
<a asp-page="Create" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
<button type="submit" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-circle-arrow-up"></span>
</button>
</form>
I can see that the folder exists here
...bower_componentsMicrosoft.jQuery.Unobtrusive.Ajax
But that is the wrong place, and I'd rather have the package manager put it in the right place than move it manually.
Why is this happening to me? Is this normal?
ajax asp.net-core visual-studio-2017 package razor-pages
add a comment |
I am very simply just trying to use the Microsoft.jQuery.Unobtrusive.Ajax
library to post ajax razor forms, but for some reason I can't get the package to install properly.
I tried installing it from the Nuget Package Manager, and I can see it in my dependancies:
But there is not folder for it under lib
So next, I tried right-clicking the project and managing bower package, and can now see in bower.json
:
"Microsoft.jQuery.Unobtrusive.Ajax": "^3.2.3"
However, the library is still not present in libs
, and when I try posting my ajax form (which i copied from here) the form is posted normally nad not 'ajax'-lly (i.e. I am redirected to the page rather than the data just posting asynchronously).
Form
<form method="post" data-ajax="true" data-ajax-method="post" data-ajax-complete="complete" enctype="multipart/form-data">
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-default">
Browse… <input asp-for="Uploads" type="file" style="display: none;" accept=".xls,.xlsx,.csv" multiple>
</span>
</label>
<input type="text" class="form-control" readonly>
</div>
<a asp-page="Create" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
<button type="submit" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-circle-arrow-up"></span>
</button>
</form>
I can see that the folder exists here
...bower_componentsMicrosoft.jQuery.Unobtrusive.Ajax
But that is the wrong place, and I'd rather have the package manager put it in the right place than move it manually.
Why is this happening to me? Is this normal?
ajax asp.net-core visual-studio-2017 package razor-pages
you could useLibMan
to install client dependencies:libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44
add a comment |
I am very simply just trying to use the Microsoft.jQuery.Unobtrusive.Ajax
library to post ajax razor forms, but for some reason I can't get the package to install properly.
I tried installing it from the Nuget Package Manager, and I can see it in my dependancies:
But there is not folder for it under lib
So next, I tried right-clicking the project and managing bower package, and can now see in bower.json
:
"Microsoft.jQuery.Unobtrusive.Ajax": "^3.2.3"
However, the library is still not present in libs
, and when I try posting my ajax form (which i copied from here) the form is posted normally nad not 'ajax'-lly (i.e. I am redirected to the page rather than the data just posting asynchronously).
Form
<form method="post" data-ajax="true" data-ajax-method="post" data-ajax-complete="complete" enctype="multipart/form-data">
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-default">
Browse… <input asp-for="Uploads" type="file" style="display: none;" accept=".xls,.xlsx,.csv" multiple>
</span>
</label>
<input type="text" class="form-control" readonly>
</div>
<a asp-page="Create" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
<button type="submit" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-circle-arrow-up"></span>
</button>
</form>
I can see that the folder exists here
...bower_componentsMicrosoft.jQuery.Unobtrusive.Ajax
But that is the wrong place, and I'd rather have the package manager put it in the right place than move it manually.
Why is this happening to me? Is this normal?
ajax asp.net-core visual-studio-2017 package razor-pages
I am very simply just trying to use the Microsoft.jQuery.Unobtrusive.Ajax
library to post ajax razor forms, but for some reason I can't get the package to install properly.
I tried installing it from the Nuget Package Manager, and I can see it in my dependancies:
But there is not folder for it under lib
So next, I tried right-clicking the project and managing bower package, and can now see in bower.json
:
"Microsoft.jQuery.Unobtrusive.Ajax": "^3.2.3"
However, the library is still not present in libs
, and when I try posting my ajax form (which i copied from here) the form is posted normally nad not 'ajax'-lly (i.e. I am redirected to the page rather than the data just posting asynchronously).
Form
<form method="post" data-ajax="true" data-ajax-method="post" data-ajax-complete="complete" enctype="multipart/form-data">
<div class="input-group">
<label class="input-group-btn">
<span class="btn btn-default">
Browse… <input asp-for="Uploads" type="file" style="display: none;" accept=".xls,.xlsx,.csv" multiple>
</span>
</label>
<input type="text" class="form-control" readonly>
</div>
<a asp-page="Create" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
<button type="submit" class="btn btn-default pull-right">
<span class="glyphicon glyphicon-circle-arrow-up"></span>
</button>
</form>
I can see that the folder exists here
...bower_componentsMicrosoft.jQuery.Unobtrusive.Ajax
But that is the wrong place, and I'd rather have the package manager put it in the right place than move it manually.
Why is this happening to me? Is this normal?
ajax asp.net-core visual-studio-2017 package razor-pages
ajax asp.net-core visual-studio-2017 package razor-pages
asked Nov 15 '18 at 9:36
BassieBassie
3,9322051
3,9322051
you could useLibMan
to install client dependencies:libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44
add a comment |
you could useLibMan
to install client dependencies:libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44
you could use
LibMan
to install client dependencies: libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44
you could use
LibMan
to install client dependencies: libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44
add a comment |
1 Answer
1
active
oldest
votes
You use a .bowerrc
file to instruct Bower where to install packages: https://jakeydocs.readthedocs.io/en/latest/client-side/bower.html
The ASP.NET Core 2.1 templates do not include this file since Bower has been deprecated.
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
@MikeBrind We can specify the provider by-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "
– itminus
Nov 16 '18 at 0:40
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53316358%2fmicrosoft-jquery-unobtrusive-ajax-impossible-to-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You use a .bowerrc
file to instruct Bower where to install packages: https://jakeydocs.readthedocs.io/en/latest/client-side/bower.html
The ASP.NET Core 2.1 templates do not include this file since Bower has been deprecated.
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
@MikeBrind We can specify the provider by-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "
– itminus
Nov 16 '18 at 0:40
add a comment |
You use a .bowerrc
file to instruct Bower where to install packages: https://jakeydocs.readthedocs.io/en/latest/client-side/bower.html
The ASP.NET Core 2.1 templates do not include this file since Bower has been deprecated.
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
@MikeBrind We can specify the provider by-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "
– itminus
Nov 16 '18 at 0:40
add a comment |
You use a .bowerrc
file to instruct Bower where to install packages: https://jakeydocs.readthedocs.io/en/latest/client-side/bower.html
The ASP.NET Core 2.1 templates do not include this file since Bower has been deprecated.
You use a .bowerrc
file to instruct Bower where to install packages: https://jakeydocs.readthedocs.io/en/latest/client-side/bower.html
The ASP.NET Core 2.1 templates do not include this file since Bower has been deprecated.
answered Nov 15 '18 at 9:43
Mike BrindMike Brind
17.3k54069
17.3k54069
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
@MikeBrind We can specify the provider by-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "
– itminus
Nov 16 '18 at 0:40
add a comment |
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
@MikeBrind We can specify the provider by-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "
– itminus
Nov 16 '18 at 0:40
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Thanks for your answer, but do you know why the nuget manager would also not be working? Perhaps a similar reason?
– Bassie
Nov 15 '18 at 9:45
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
Yes - Nuget isn't great for client side stuff. You could try using LibMan as suggested by @itminus: dzone.com/articles/… - except last time I checked, Unobtrusive AJAX wasn't available on the CDNs that LibMan accesses.
– Mike Brind
Nov 15 '18 at 9:51
1
1
@MikeBrind We can specify the provider by
-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "– itminus
Nov 16 '18 at 0:40
@MikeBrind We can specify the provider by
-p unpkg
: "unpkg is a fast, global content delivery network for everything on npm "– itminus
Nov 16 '18 at 0:40
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53316358%2fmicrosoft-jquery-unobtrusive-ajax-impossible-to-install%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you could use
LibMan
to install client dependencies:libman install -p unpkg jquery-ajax-unobtrusive
– itminus
Nov 15 '18 at 9:44