开发者

How to call a razor partial view in aspx view page

开发者 https://www.devze.com 2023-03-09 14:47 出处:网络
I have a razor partial view. I want to use it in an aspx view. How can I do thi开发者_如何学Cs?My understanding is that RenderPartial() cannot call a different view engine, but using RenderPage() wil

I have a razor partial view. I want to use it in an aspx view.

How can I do thi开发者_如何学Cs?


My understanding is that RenderPartial() cannot call a different view engine, but using RenderPage() will allow you to use a different view engine.

Edit: Looks like you should have no problems rendering an aspx view in a razor page using RenderPartial()


If you have your action method return a "PartialViewResult", it will know how to render whatever partial you return, either ascx or razor. It's all HTML in the end.

0

精彩评论

暂无评论...
验证码 换一张
取 消