asp.net mvc - Rendering a partialview from within a helperclass in Umbraco -
i have html used lot in site i'm building. created app_code\helpers.cshtml file , placed helperfunction in file.
now, want render partial-view (a mvc view form). can't use @html.partial("myformpartial", new formmodel())
i can't find other ways of rendering partial view within helper class. got idea on how solve this?
is seperate helpers.cshtml
best way kind of repeating html-code? think gives me bit more freedom in parameters i'm providing, instead of macro's. sucks can't use @umbraco
(without creating own helper) or @html
:(
just pass @html
helper function if don't want create inside helper function.
nevertheless, isn't better idea use child action , render part of code you'd been shared?
Comments
Post a Comment