zoukankan      html  css  js  c++  java
  • MVC基架生成的Index视图

    @model IEnumerable<MyMusicStore.Models.Album>

    @{
        ViewBag.Title = "Index";
    }

    <h2>Index</h2>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Artist.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Genre.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Price)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.AlbumArtUrl)
            </th>
            <th></th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Artist.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Genre.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AlbumArtUrl)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.AlbumId }) |
                @Html.ActionLink("Details", "Details", new { id=item.AlbumId }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.AlbumId })
            </td>
        </tr>
    }

    </table>
     

  • 相关阅读:
    在Wince下使用钩子函数
    WinCE下钩子应用(一)——WinCE 下实时捕获键盘消息
    记录此刻
    常用数列
    百度之星度度熊拼三角
    笛卡尔定理
    Lucas定理
    简单概念
    Unknown Treasure Lucas+中国剩余定理+快速乘
    2017ccpc杭州站 Problem B. Master of Phi
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434601.html
Copyright © 2011-2022 走看看