I've new to ASP.NET MVC and .NET in general, so just got a simple question. I want to display a list of objects on the web page, what's the best way to do it?
The models so far are as follow:
public class NoticeBoard
{
public List<Notice> Notices;
public NoticeBoard()
{
Notices = new List<Notice>();
}
}
public class Notice
{
public int ID;
public DateTime StartDate;
public DateTime EndDate;
public String Content;
}
So real simple, the controller creates a NoticeBoard object containing a list of notices, and the View needs to display the notices.
I see there're controls like GridView, DataList, DetailsView, ListView. What're the differences between them and which one is most suitable for this case?