Reputation: 1875
I'd like to know how to include another razor page in running razor view just as PHP's "include" term. It can be considered as partial classes. Half of work is done at a.cshtml and the other half of works are done at b.cshtml. But in reality two of them are built as one razor page.
Any ideas will be appreciated...
Upvotes: 13
Views: 18489
Reputation: 14302
You can use Partial Views in MVC.
Try RenderAction or RenderPartial methods to render another view or partial view in a current view.
More Reference :
Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction
Upvotes: 8