Open andrewdavey opened 13 years ago
In MVC Render is used without @Html, it is @RenderBody() and @RenderSection(...), a logical syntax for Knapsack would be:
@RenderStyles() @RenderScripts() @RenderScripts(location: "body") or @RenderBodyScripts()
But this is only possible if you create a KnapsackWebPageBase that inherits from WebPageBase, see http://haacked.com/archive/2011/03/05/defining-default-content-for-a-razor-layout-section.aspx.
I wouldn't want to force a new base class on people, so let's stick with HtmlHelper methods.
Html.RenderPartial does exist as well: http://msdn.microsoft.com/en-us/library/dd492503.aspx
Knapsack adds
Html.RenderScripts()
andHtml.RenderStylesheetLinks()
. These are returning IHtmlString and used like@Html.RenderScripts()
This differs from the MVC helpers, such as
@Html.Partial("name")
vs@{ Html.RenderPartial("name"); }
Should Knapsack's API be updated to remove the "Render" prefix from the helper names?