
Chapter 9: Creating Web Applications with ASP.NET MVC | 283 |
... content removed
<% foreach (var item in Model) { %>
<tr>
<td>
<%= Html.ActionLink("Edit", "Edit", new { id=item.CustomerID }) %>
<%= Html.ActionLink("Delete", "Delete", new { id=item.CustomerID })%>
</td>
... content removed
VB:
... content removed
<h2>Index</h2>
<p>
<% If Not TempData("Result") Is Nothing Then %> <label>
<%= Html.Encode(TempData("Result").ToString())%> </label>
<% End If%>
</p>
<p>
<%= Html.ActionLink("Create New", "Create")%>
</p>
<table>
... content removed
<% For Each item In Model%>
<tr>
<td>
<%=Html.ActionLink("Edit", "Edit",
New With {.id = item.CustomerID})%>
<%=Html.ActionLink("Delete", "Delete", New With {.id = item.CustomerID})%>
</td>
... content removed