ASP.NET Need advice in making a very simple comment page using listview and peoples username
I have a asp.net site that is nearly complete.
I have the ability to register and log in.
I want to add a page where reigstered members can make a comment that is saved to a very simple message board (possibly a guestbook type thing).
How can I do this... would using a gridview/listview be a good idea?
I have created a table for the use saving messages to a database. I have bas开发者_如何学运维ically the following fields:
MessageId (PK), UserID (FK), Comment, Date
How hard would it be to implement this? am I going down the right path?
Thanks in advance,
Jason
Many options.
I would consider the listview -- it is by far the most flexible and powerful. You can have it render tables, divs, lists, or whatever you like. Much more flexible / easy to style and layout. And if you ever decide to make your comment list more interactive (such as collecting reactions to comments, rating, or whatever), I think it will be a lot easier to modify layout than some of the other controls.
MSDN magazine made a case for it a few years ago -- http://msdn.microsoft.com/en-us/magazine/cc337898.aspx.
Also, here is the MSDN on it -- http://msdn.microsoft.com/en-us/library/bb398790.aspx
精彩评论