This works because it returns the result of a partial view of the view in a string:
@Html.Partial("Path/to/my/partial/view")
But I prefer to use RenderPartial , and I think I need to write:
@{Html.RenderPartial("Path/to/my/partial/view");}
instead:
@Html.RenderPartial("Path/to/my/partial/view");
To make it work. Error message:
Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
If it is best to open the @{...} code block for just one method call?
asp.net-mvc asp.net-mvc-3 razor
artvolk Aug 08 2018-11-11T00: 00Z
source share