I am starting to learn MVC. In WebForms you can easily do this….
If(checkbox.checked == true)
checkbox2.checked = true
Heres my shot at MVC
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (ChkBox1)
{
ChkBox2 = true
yield return ChkBox2;
}
}
Of course this doesnt work. Anybody have any ideas. It seems like a simple thing to do.
I would probably do this in javascript using a library like jQuery rather than server side.