Now we can add some data-bound controls to the web application project we created earlier, and really see the power of NHibernate and ASP.NET together.
Open up the
Default.aspx
page from the Ordering.Web solution we created earlier. In the<head>
section, between the</title>
tag and the</head>
tag, add the following CSS code to properly render our items:<style type="text/css"> .contacts li { display: inline; float: left; margin: 0 0 15px 15px; } </style>
Inside the body, between the
<div>
and</div>
tags, add the following code:<asp:ListView ID="contactView" runat="server"> </asp:ListView>
If you look down at the bottom of the screen, you will see three buttons, Design, Split, and Source. Select the Split button to split the page into two parts, one displaying the code and the other displaying the "real-time view" of your page.
As you can see in the Design portion of...