I have a form in the view section that has a checkbox type input
<div class="checkbox">
<label class="">active</label>
<div class="icheckbox_flat-green checked" style="position: relative;">
<input type="checkbox" id="AdvActive" name="AdvActive" class="flat" checked="checked"/>
</div>
</div>
And through the ajax code below I send the values to the controller
$.ajax({
type: "post",
url: '@Url.Action("CreateAdvBanner", "Advertise")',
cache: false,
data: form.serialize()
})
All form values are sent to the controller except the same checkbox. Do I want to send "True" to the controller when the checkbox is checked? This is my controller
[HttpPost]
public IActionResult CreateAdvBanner(string AdvCode, int AdvPrice ,int AdvDay, string AdvDesc,bool AdvActive)
{