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 KhanPosted Mar 16, 2017, 8:11 AM
Vaibhav DeshmukhPosted Mar 16, 2017, 8:08 AM
Ramesh PalanivelPosted Mar 16, 2017, 8:04 AM
Abhilash J APosted Mar 16, 2017, 8:00 AM
Ramesh PalanivelPosted Mar 16, 2017, 7:54 AM
Abhilash J APosted Mar 16, 2017, 7:48 AM
Ramesh PalanivelPosted Mar 16, 2017, 7:37 AM
Abhilash J APosted Mar 16, 2017, 7:28 AM
Vaibhav DeshmukhPosted Mar 16, 2017, 7:01 AM