I work on asp.net MVC . I can't pass value of retain stuff checkboxes to submit function Yes have id RetainStuffTrue and it is value True No have id RetainStuffFalse and it is value False if session role code not equal LM then the checkboxes retain stuff will not display so retain stuff display based on session is LM or not submit function will execute when click approve button so any one can help me how to pass value to retain stuff to submit if yes then true if No then false
@if (Session[BLL.Common.SessionKeys.RoleCode].ToString() == "LM" )
{
@Html.Label("Did you try to retain the staff?", htmlAttributes: new { @class = "control-label col-md-5" })
Yes
No
}
Approve
on jQuery i handle event change checkbox by jquery below
$('.retaindtuff-checkbox').on('change', function () {
$('.retaindtuff-checkbox').not(this).prop('checked', false);
$(this).val(this.checked);
});
ahmed salahPosted Jan 21, 2024, 6:29 PM
can you show me please how to pass retain stuff check box yes or no value
to hidden field when click to approe button
and how to pass hidden field to submit() java script function please
so after that can insert it