<input id="@question.QuestionId" type="radio" value="@question.QuestionDescription" name="@string.Format("name_{0}", question.Group)" checked=@question.IsSelected"checked":false /> @question.QuestionDescription
Depending on the question.IsSelected value the checkbox should be selected or not selected.
But regardless of true or false of the IsSelected property Radiobutton is always checked. Can you point where the error in checked attribute please
If you give it anything for the
checkedattribute it will be set to checked. I would optionally add the entirechecked='checked'value based on theIsSelectedproperty, omitting it when the value is false.