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
Abhilash J A
531
2.4k
602.4k
Find model items is equal to checkboxid using jquery in mvc4
Mar 1 2016 7:02 AM
Hi,
I tried to implement this code in view page with model, but error occured in mvc4 c#
@model List<EMGUI.ViewModel.SP_GetClientContractEdit>
@{
ViewBag.Title = "_EditClientContact";
Layout = null;
}
$('input[class="chkProductDetails"]').each(function (e) {
//alert(this.id)
var chkid = 'cb_' + this.id;
@foreach(var item in Model)
{
if (chkid==item.ProductDetailsId) {
var chkclass = $(this).id;
chkclass.prop('checked', true);
}
}
});
From this code i want to check if 'chkid' is equal to 'item.ProductDetailsId' then checked true checkbox. checkbox design is given below:-
<td style="width: 30px">
<input type="checkbox" id="@item.Id" class="chkProductDetails" /></td>
Reply
Answers (
2
)
Functionality for Swipe and zoom multiple image in div tag
How to validate authorised mail id in asp.net using c#?