Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC "Components"

Is there someway to have a part of the page that renders like a little sub-page, like components?

For example, if I have a shopping cart on all my pages?

like image 679
Jesper Blad Jensen Avatar asked Sep 16 '08 15:09

Jesper Blad Jensen


1 Answers

Using preview 5, Html.RenderPartial is your man, you can render sub-controls, and pass them your viewdata, or an arbitrary model, and new viewdata combo.

like image 64
DevelopingChris Avatar answered Oct 30 '22 08:10

DevelopingChris