Nov 16, 2012, 2:19 PM
[MVC] How to use partial view twice in same view?
I have an "Edit User" Panel, and an "Add User" Window. I want both to display the same FormPanel, which I have defined in Views/Shared/_UserForm.cshtml
Right now I am displaying the partial view in the "Edit User" section by doing
So, how can I add the same partialview to my main view twice?
Right now I am displaying the partial view in the "Edit User" section by doing
viewportItems.Add(Html.X().FormPanel()
.ItemsFromPage(this, "~/Views/Shared/UserForm.cshtml"));
However when I try to use ItemsFromPage again to add it to the window, I get the error
An item with the same key has already been added.