Partition Web Apps Intelligently: C#: Create the Contact List Screen: Listing 1

This is the complete mark up for the contact list screen.

<%@ Page Title="Contacts" Language="C#" 
    AutoEventWireup="true" CodeBehind="Index.aspx.cs" 
    Inherits="Pim.Web.Views.Contacts.Index" %>
<%@ Import Namespace="Pim.Web" %>
<%@ Import Namespace="Pim.Web.Controllers" %>
<%@ Import Namespace="Pim.BusinessLayer" %>

<asp:Content ID="Content2" 
    ContentPlaceHolderID="mainContent" runat="server">
       => c.Create(null), "Add New Contact") %>    

    <table cellspacing="0" cellpadding="4" border="1">
            <th scope="col">First Name</th>
            <th scope="col">Last Name</th>
            <th scope="col">Email</th>
            <th scope="col"> </th>

        <%foreach(GetContactListResult contact in 
            this.ViewData.Model) { %>
                <td><%=contact.FirstName %></td>
                <td><%=contact.LastName %></td>
                <td><%=contact.Email%> </td>
                    <%=Html.ActionLink<ContactsController>(c => 
                        c.Create(contact.ContactID), "Edit")%>
                    <%=Html.ActionLink<ContactsController>(c => 
                        c.Delete(contact.ContactID), "Delete") %>
        <% } %>
comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.