When there is only one person to select, then people should specify people [hardcod] value 'TRUE' I need to do
@if (hasMoreThanOnePerson) {& lt; Td> I have selected assets to satisfy my verification. @html CheckboxFor (M => M.Peepal [I]. Season Selected) & lt; / Td> } Else {@ Html.HiddenFor (m = & gt; m.People [i] is selected, true) / / always set TRUE in hidden field for loop with indicator}
to hide This will output to HTML: value
to use html properties
Using the property of the field or:
@ html.HiddenFor (m => m.People [i]. Is selected, new {value = "true"})
& lt; Input id = "YourModel.People [0] .Is selected" name = "YourModel.People [0] .Is selected" type = "hidden" value = "true" & gt;
No comments:
Post a Comment