TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
515
46.9k
About Ajax Send Request
Mar 9 2021 12:02 PM
hello,
I am getting an Internal server error after button click
Following is my button click code :
$(
'#btnUpdatePermissionContacts'
).click(
function
() {
var
abc =
''
;
$(
'input[type=checkbox]'
).each(
function
() {
if
(
this
.checked) {
abc = abc + $(
this
).val() +
","
//assign set value to hidden field
$(
'#PermissionIds'
).val(abc);
}
});
var
formdata =
new
FormData();
formdata.append(
"PermissionIds"
, jQuery(
"#PermissionIds"
).val());
alert($(
"#PermissionIds"
).val());
$(
"#LoaderOnDEP"
).show();
$.ajax({
url:
'/Document/UpdatePermission'
,
//url: '@Url.Action("UpdatePermission", "Document")',
type:
"POST"
,
contentType:
false
,
// Not to set any content header
processData:
false
,
// Not to process data
data: formdata,
dataType:
'json'
,
success:
function
(result)
{
if
(result.val.IsSuccess ===
true
) {
$DocumentListPartial.html(result.partialView);
window.IsNew =
true
;
$(
"#toastupdatetdmsg"
).html(
'Permission for contact(s) updated successfully.'
);
toastbox(
'toast-updatetd'
);
}
else
{
}
$(
"#LoaderOnDEP"
).hide();
},
error:
function
(err) {
alert(err.statusText);
}
});
});
Reply
Answers (
2
)
Dependency injection is not working
Table with a DropDownListFor inside every row in a Partial View .NET