BeginCollectionItem icon indicating copy to clipboard operation
BeginCollectionItem copied to clipboard

Cannot exclude using BeginCollectionItem for particular views

Open singhkamall opened this issue 6 years ago • 1 comments

I have removed <add namespace="HtmlHelpers.BeginCollectionItem" /> from my web.config And @using HtmlHelpers.BeginCollectionItem and @using (Html.BeginCollectionItem){} from my particular views.

Views are still rendering those <ul>, <li> and hidden elements from Collection.cshtml

I want to use BeginCollectionItem only for particular views but it seems to be used everywhere even after I have removed it.

Am I missing something?

singhkamall avatar Oct 15 '18 15:10 singhkamall

Has there been any workarounds found for this? I am running into this issue as well.

Edit: Found a workaround. Deletion or name change of the Collection.cshtml file in the EditorTemplates folder allows use of Html.BeginCollectionItem() control without automatically modifying all EditorFor() controls.

NickalasLight avatar Oct 16 '20 18:10 NickalasLight