﻿@model SpaceBlog.Models.CommentViewModel

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Comment</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(m => m.Id)
        @Html.HiddenFor(m => m.ArticleId)
        @Html.HiddenFor(m => m.AuthorId)

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

﻿@model SpaceBlog.Models.CommentViewModel

@{
    ViewBag.Title = "Edit";
    ViewBag.Message = "Comment";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="container">
        <h2>@ViewBag.Title</h2>
        <h4>@ViewBag.Message</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(m => m.Id)
        @Html.HiddenFor(m => m.ArticleId)
        @Html.HiddenFor(m => m.AuthorId)

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10" style="margin-top: 10px">
                <input type="submit" value="Save" class="btn btn-success" />
                @Html.ActionLink("Back", "Index", new { @id = ""}, new { @class = "btn btn-primary" })
            </div>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
Change div class and change the position of button back
Change div class and change the position of button back
