When you use Html.RenderPartial it takes the name of the view you want to display and displays its contents in that place.
I would like to implement something like this. I would like it to take the name of the view you want to display, along with some other variables, and display the contents in the container.
For example:
public static class WindowHelper { public static string Window(this HtmlHelper helper, string name, string viewName) { var sb = new StringBuilder(); sb.Append("<div id='" + name + "_Window' class='window'>");
Does anyone know how to do this?
c # asp.net-mvc html-helper partial-views renderpartial
Matt
source share