Hi,
I am working on MVC 5, there is Controller: LoginUser and ActionName: Login . But showing error. 'The resource cannot be found.' How can I solve this?
Note: But when I hit break point to the Login method, then It hitting there. But suddenly the error message showing.
Please help me...
Error,
This is the ajax call to controller action method. I using usermange.js file for implimenting java script.
- $('#frmSubmitLoginUser').submit(function () {
- debugger;
- if ($(this).valid()) {
- var formData = new FormData(this);
- var options = { "backdrop": "static", keyboard: true };
- $.ajax({
- url: "/LoginUser/Login",
- type: "POST",
- data: $('form').serialize(),
- success: function (result) {
- $('#alertMsgModalContent').html(result);
- $('#alertMsgModal').modal(options);
- $('#alertMsgModal').modal('show');
- },
- error: function (result) {
- }
- });
- e.preventDefault();
- $("#closbtn").click(function () {
- $('#alertMsgModal').modal('hide');
- });
- }
- return false;
- });
- @using (Html.BeginForm(null, null, FormMethod.Post,new { id = "frmSubmitLoginUser" }))
- {
- /*Here, html another controls*/
- <input type="submit" value="Submit" class="btn reg-btn btn-block">
- }
- [HttpPost]
- public ActionResult Login(PartnerVM partnerVM)
- {
- /*Save action*/
- return PartialView("~/views/UserRegister/_savedSuccessMessageBox.cshtml");
- }


Abdussami Khan35 reputationPosted Mar 16, 2017, 4:11 AM EDT
Vaibhav DeshmukhRank #5,346 · 302 reputationPosted Mar 16, 2017, 3:01 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 16, 2017, 3:37 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 16, 2017, 3:54 AM EDT
Ramesh PalanivelRank #372 · 6.8K reputationPosted Mar 16, 2017, 4:04 AM EDT
Vaibhav DeshmukhRank #5,346 · 302 reputationPosted Mar 16, 2017, 4:08 AM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Mar 16, 2017, 3:28 AM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Mar 16, 2017, 3:48 AM EDT
Abhilash J ARank #1,243 · 1.4K reputationPosted Mar 16, 2017, 4:00 AM EDT