You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a bug in GetCollectionItemIndex in your CollectionEditorExtensions.
I found I was getting a newly created GUID after postback for the second item in the collection, after a server side validation failure. The symptom was that validation messages were not being displayed due to the ID in model state not matching the re-rendered id in the partial view. You appear to be adding previous indices into a different queue from the one passed to other views in HttpContext.
It seems that your code
previousIndices = new Queue<string>();
HttpContext.Current.Items[fieldKey] = new Queue<string>();
should actually be
previousIndices = new Queue<string>();
HttpContext.Current.Items[fieldKey] = previousIndices;
Thanks
The text was updated successfully, but these errors were encountered:
Hello
There appears to be a bug in GetCollectionItemIndex in your CollectionEditorExtensions.
I found I was getting a newly created GUID after postback for the second item in the collection, after a server side validation failure. The symptom was that validation messages were not being displayed due to the ID in model state not matching the re-rendered id in the partial view. You appear to be adding previous indices into a different queue from the one passed to other views in HttpContext.
It seems that your code
should actually be
Thanks
The text was updated successfully, but these errors were encountered: