public void GetCurrState(string currPrefix, int updateIndex, ModelStateDictionary modelState) { string prefix = "$${0}.$.Item.OldValue"; if (!string.IsNullOrWhiteSpace(currPrefix) && currPrefix != "display") { prefix = currPrefix + "." + prefix; } BasicHtmlHelper.ClearRelevantErrors(modelState, string.Format(prefix, updateIndex)); }