Checkbox value is always returning false
<p>I have a checkbox </p>

<pre><code>&lt;input id="Run" name="Run" value="true" type="checkbox"&gt;

&lt;input name="Run" value="false" type="hidden"&gt;
</code></pre>

<p>and When I try to get the value it always returns false</p>

<pre><code> $('#Run').val()

"False"
</code></pre>

<p>I tried to get the value using .prop </p>

<pre><code>$('#Run').prop('checked')
</code></pre>

<p>but I still get the value as false</p>

<p>I also tried   </p>

<pre><code> $('#Run').on('change', function () {
        $('#Run').val($(this).is(':checked') ? 'True' : 'False');
    });
</code></pre>