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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -