Skip to main content
As suggested by the solution in question area, ! is supposed to be with true state
Source Link
vulcan raven
  • 33.8k
  • 11
  • 61
  • 101

The second parameter is selected, so use the ! to select the no value when the boolean is false.

<%= Html.RadioButton("blah", !Model.blah) %> Yes <%= Html.RadioButton("blah", !Model.blah) %> No 

The second parameter is selected, so use the ! to select the no value when the boolean is false.

<%= Html.RadioButton("blah", Model.blah) %> Yes <%= Html.RadioButton("blah", !Model.blah) %> No 

The second parameter is selected, so use the ! to select the no value when the boolean is false.

<%= Html.RadioButton("blah", !Model.blah) %> Yes <%= Html.RadioButton("blah", Model.blah) %> No 
Source Link
Brian Mains
  • 50.8k
  • 35
  • 155
  • 260

The second parameter is selected, so use the ! to select the no value when the boolean is false.

<%= Html.RadioButton("blah", Model.blah) %> Yes <%= Html.RadioButton("blah", !Model.blah) %> No