Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
9
Reply
error - The resource cannot be found. MVC
Mani Kandan
Mar 16 2017 6:30 AM
1.3k
Reply
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)
{
/*Save action*/
return
PartialView(
"~/views/UserRegister/_savedSuccessMessageBox.cshtml"
);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
select value of drop-down should show in my Edit dropdown
How to bind JSON to webform controls