BeginCollectionItem
BeginCollectionItem copied to clipboard
Cannot exclude using BeginCollectionItem for particular views
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?
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.