If your intention is to have the values changed and triggered by the toggle of the checkbox, consider these suggestions.
Use jQuery to attach an event for each of your checkboxes. Have it make an AJAX call to a URL in your controller. That event will fire whenever toggled, and would run this code:
$.ajax({
//this could also be built with '<%= Url.Action("UpdateUserRole","User") %>/
url: "/User/UpdateUserRole",
type: "POST",
data: {
"userID" : "", //somehow place the user's ID here - cookie, session, etc.
"roleID" : $('#theCheckbox').val(),
},
success: function(data) { alert(data); }
});
Make that new controller action method. Perhaps it looks like:
public string UpdateUserRole(int userID, int roleID){
//go update the DB with the 2 params as needed.
}
Within, you can call your database to remove/add the role to the user, depending on whether it exists currently. It's up to you whether you want a boolean to indicate enable/disable, but that'll complicate your View. My suggestion would make the action a simple 'flip' of the state in the database. If the user/role pairing exists, delete it. If it doesn't, create it.
Ensure security of that controller method. You may not want anyone to detect how the scheme works. Perhaps include Html.AntiForgeryToken
in your form, and require it on your controller method.