MVC3 Razor: Is it Possible to Render a Legacy ASCX?

后端 未结 2 1272
暖寄归人
暖寄归人 2021-01-04 14:06

With the Razor view engine in MVC3,

Is it possible to render a legacy ascx?


I was expecting to be able to do something lik

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 14:48

    Yes. Try this instead:

    @Html.Partial("Footer")
    

    or

    @{ Html.RenderPartial("Footer"); }
    

提交回复
热议问题