Starting with asp.net MVC

Posted by Josemalive on Stack Overflow See other posts from Stack Overflow or by Josemalive
Published on 2010-06-14T10:04:33Z Indexed on 2010/06/14 10:22 UTC
Read the original article Hit count: 288

Filed under:
|

Hello,

Actually im doing a home page that only have an action called Index() that returns the view Index.ascx.

This index page will be composed by lastest news and lastest registered users, i think that create two partial views is the best idea (this way i could use it in other views).

for other hand i have a data access class that calls to database for get stuff (get last news, get last users, etc...)

My question is simple, should i call to the this data access class in the Index() action of my HomeController, and add to the ViewData the data obtained?

I think that this index() action shouldnt be the responsable of passing this data to the partial views, right?

Could you give me a hand?

im messing too much? ;-)

Thanks in advance.

Best Regards.

Jose

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-2