Need an advice for ASP.NET MVC2 Newsletter Project

Posted by ck3g on Stack Overflow See other posts from Stack Overflow or by ck3g
Published on 2010-05-13T20:16:26Z Indexed on 2010/05/13 22:44 UTC
Read the original article Hit count: 162

Filed under:
|

I'm new in ASP.NET MVC2. But I want to develop a simply Newsletter site. The main problem which stuck me is how correctly use MVC pattern in News details and comments list.

For example:

I have a NewsController and action Details inside. And two model classes News and Comments. I want show all comments belongs to this News record and textarea for adding new comments. I wand display all this content in /News/Details/

How can i do it? I tried use PartialViews in Details View: one for Adding Comment and another for Comment list. I have passed comment object thorough ViewData["Comment"]. But i have problems with my models (think I cant use two models in View)

Again. How can I display Single Post + Comments + add comment view at single page using ASP.NET MVC2?

Another Example is stackoverflow.com. Here is an question + answers + write answer. I need same structure

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about mvc