I would like to pass more than one parameter to the partial view. With the following
<% Html.RenderPartial("Details", Model.test, new ViewDataDictionary { { "labelName", "Values1" }, {"header", "Header1"}, {"header2", "Header2"}}); %>
code, I am having error message
) missing.
What is wrong?
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<MvcUI.Models.Label>>" %>
<%var label = ViewData["labelName"];%>
<%int count = 0; %>
<%if (Model!=null) {%>
<% foreach (var model in Model){ %>
<%if (!String.IsNullOrEmpty(model.Name))
{%>
<li>
<%: Html.Hidden((label)+".Index", count.ToString())%>
<%: Html.TextBox((label)+"[" + (count) + "].Name", model.Name, new { Style = "width:280px" })%>
<%: Html.Hidden((label)+"[" + (count++) + "].ID", model.ID, new { Style = "width:280px" })%>
<input type="button" value = "Delete"/>
</li>
<%}
%>
<%} %>
<% } %>