Starting with asp.net MVC
- by Josemalive
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