Yes, of course, it is possible. You can use the standard checkbox:
@Html.CheckBoxFor( x => x.Foo, new { data_url = Url.Action("SomeAction", "SomeController"), id = "mycheckbox" } )
and then in your separate javascript file use jQuery to subscribe to the event this flag changes and unobtrusively AJAXify:
$(function() { $('#mycheckbox').change(function() { var data = {}; data[$(this).attr('name')] = $(this).is(':checked'); $.ajax({ url: $(this).data('url'), type: 'POST', data: data, success: function(result) {
source share