動くコード図鑑技術記事現場の渡り方キャリア論すべての記事About
C#

前提となるMODEL

出典: ASP.NETでControllerにActionLinkを使って引数を渡す方法前提となるMODEL

前提となるMODEL (csharp)#33c09141984c
@model WebApplication1.Models.Article
 
@{
    ViewBag.Title = "Details";
}
<h2>Details</h2>
<div>
    <h4>Article</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.title)
        </dt>
    <dd>
        @Html.DisplayFor(model => model.title)
    </dd>
 
    <dt>
        @Html.DisplayNameFor(model => model.body)
    </dt>
 
    <dd>
        @Html.DisplayFor(model => model.body)
    </dd>
 
    <dt>
        @Html.DisplayNameFor(model => model.created)
    </dt>
 
    <dd>
        @Html.DisplayFor(model => model.created)
    </dd>
 
    <dt>
        @Html.DisplayNameFor(model => model.updated)
    </dt>
 
    <dd>
        @Html.DisplayFor(model => model.updated)
    </dd>
 
</dl>
▸ この snippet は実行結果未収録
▸ 実行結果は未収録です
  • id: #33c09141984c
  • lines: 42
  • extracted: 2026-06-10

Source収録記事

この snippet は記事の「前提となるMODEL」セクションに登場する。コードの前後の文脈・ハマりどころの解説は記事本文で。

同じ記事から

4
図鑑トップ