views:

776

answers:

1

For a Yes/No radio button group the following Html is rendered. The correct value of the response.text property is returned to the controller. However, the choiceID property of the hidden input is always "1" (the hidden value from first button).

Also, the two instances of the selection values are returned to the Model List. ie.
" no, Id= 1" " no, Id= 1"

<input id="response.Index" name="response.Index" type="hidden" value="1" />
<input id="response[1].choiceID" name="response[1].choiceID" type="hidden" value="1" />  
<input id="response[1].text" name="response[1].text" type="radio" value="yes" />
<label>yes</label>

<input id="response.Index" name="response.Index" type="hidden" value="1" />
<input id="response[1].choiceID" name="response[1].choiceID" type="hidden" value="2"/>                 
<input id="response[1].text" name="response[1].text" type="radio" value="no" />
<label>no</label>
A: 

THe double instance is do to the two response.index. Howver, I still cannot get the correct hidden value passed to controller.