Skip to content

Instantly share code, notes, and snippets.

@avisser
Created May 13, 2016 14:35
Show Gist options
  • Save avisser/71f24703b36a6cb0686a85e56144df41 to your computer and use it in GitHub Desktop.
Save avisser/71f24703b36a6cb0686a85e56144df41 to your computer and use it in GitHub Desktop.
int i=0;
foreach(var rule in Model.Rules) {
@Html.Partial("ValidationRuleRow", rule, new ViewDataDictionary {
TemplateInfo = new System.Web.Mvc.TemplateInfo { HtmlFieldPrefix = string.Format("Rules[{0}]", i) } })
i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment