none
How can i use css into cshtml? RRS feed

  • 질문

  • @model IEnumerable<MvcBoard.Models.Post>

        @{
            ViewBag.Title = "Index";
        }
        @Styles.Render("~/Content/Board.css")
        <h2>Index</h2>

        <p>
            @Html.ActionLink("Create New", "Create")
        </p>
        <table class="table">
            <tr>
                <th>
                    @Html.DisplayNameFor(model => model.name)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.subject)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.content)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.writeTime)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.readCount)
                </th>
                <th></th>
            </tr>

        @foreach (var item in Model) {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.subject)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.content)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.writeTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.readCount)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id=item.postNo }) |
                    @Html.ActionLink("Details", "Details", new { id=item.postNo }) |
                    @Html.ActionLink("Delete", "Delete", new { id=item.postNo })
                </td>
            </tr>
        }

        </table>

     @Styles.Render("~/Content/Board.css") This Part doesn't have error. But That code is not working. Somebody give me Help.
    2018년 1월 3일 수요일 오전 7:29

모든 응답