c# - Hacking Razor partial views into a WebForms project in MVC5 -
so, i'm supporting project made webforms, i've upgraded mvc5 , want use razor views new features i'm adding. why want because i've no time/will rewrite stuff got pure razor view.
there used hack achieve sort of stuff extending controller , rendering razor view inside aspx view partial. described here
but in mvc3, applied project throws stackoverflowexception when trying render page.
any ideas of achieving in mvc5?
hmpf, googling topic looked obscure... actually, solution straightforward.
two files:
someview.aspx someview_razor.cshtml
aspx 1 incorporates site.master , things need. , little fella :
<% html.renderpartial("someview_razor"); %>
voila!
Comments
Post a Comment