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
aditya immadi
NA
215
23.8k
check box list is not woking in my view
Oct 25 2016 3:00 AM
hai all i wrote this sample code for selecting check boxes in check box list my view is
for this i did like first i bind the tablle and attached to list
@{
List<SelectListItem> listcheck = new List<SelectListItem>();
foreach (DataRow row in dtcheck.Rows)
{
//listcheck.Add(new SelectListItem { Value = row["RoleID"].ToString(), Text = row["RoleName"].ToString() });
<input type="checkbox" name="selected" value="@row["RoleID"]" id="checked" />
@row["RoleName"]
}
}
and after
<script type="text/javascript" src="~/Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery-ui-1.8.24.min.js"></script>
<script type="text/javascript" src="js/bootstrap-2.3.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<script type="text/javascript">
$(document).ready(function () {
alert("Document ready");
//$("#somebutton").on("click", function () {
// alert("clicked");
// var v = $("#checked").val();
// var v = $('input[name=selected]:checked').val();
// alert(v);
//});
$('#checked').multiselect({
includeSelectAllOption: true
});
$("#somebutton").on("click", function () {
alert("button clicked");
alert($('#checked').val());
})
});
</script>
<button id="somebutton">forTestOnly</button>
the commented jquey is working however the one which i need in that not even button cick is not working can any one help me
Thanks and Regards
Reply
Answers (
2
)
How to turn off Classic Asp custom error on IIS server 7.5
Handle enter key press with two button.