Let's go back to the Index.cshtml
view that was added to the Views/Forum
folder and start building the user interface for the thread view and creation of new threads. Start by changing the headline from Index
to All threads
by finding the <h2>
tag close to the top of the file, as shown here:
<h2>All threads</h2>
Now, we want to add a table that will serve as the thread list, and yes it actually is a good use of the table. In HTML, table was abused for years to deal with layout instead of being used for listings like this. We use bootstrap CSS classes to make it look good. Add the following code right after the <h2>
headline:
<table class="table table-bordered table-striped table-condensed table-hover"> <thread> <tr> <th>Title</th> <th>Started</th> <th>Started by</th> <th>Last post</th> <th...