简体   繁体   中英

Sharing view presentation mode?

I am building an ASP .NET MVC 3 application, and I want to make sure that I am following the MVC guidelines as well as possible.

I have a front page that displays a list of computer games. Now, it has the same way of displaying the items as another page. How would I do this through an MVC perspective?

Would I have a function in my controller that returns a string containing the HTML of the list of games, and then print that out on both pages? Or how would I do this in a proper way?

partial views. you should be able to find a lot of information about them via search.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM