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;
- });
View,
- @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">
- }
Controller,
- [HttpPost]
- public ActionResult Login(PartnerVM partnerVM)
- {
-
- return PartialView("~/views/UserRegister/_savedSuccessMessageBox.cshtml");
- }