asp.net mvc javascript Hide table row by default if model bool property is false
<p>I added a javascript to hide tablerow if the user click on a toggle radio button.</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        $('#radio1').change(function () {
            if ($(this).val() == false) {
                $('#trMyTextBox').show();
            }  
        });
        $('#radio2').change(function () {
            if ($(this).val() == false) {
                $('#trMyTextBox').hide();
            }
        });
    });
&lt;/script&gt;

&lt;tr id="trMyTextBox"&gt;
&lt;td style="width: 50%;"&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;div class="col-xs-7"&gt;
@Html.TextBoxFor(model =&gt; model.MyTextBox, new {@id = "textEmail", @class = "form-control"})
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>I got it working when the user is clicking between the radio buttons. I need to make a change, from my controller, I am passing in model and if the properties like showtextbox is false, I need to hide the table row by default. How do I do that? Thanks.</p>