Skip to content

Instantly share code, notes, and snippets.

@tusmester
Created February 8, 2018 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tusmester/494d5864f36d97e71c666134e44689ff to your computer and use it in GitHub Desktop.
Save tusmester/494d5864f36d97e71c666134e44689ff to your computer and use it in GitHub Desktop.
#sn #mvc #view #deletetask
@{
ViewBag.Title = "Delete task";
ViewBag.Message = "Are you sure you want to delete this task?";
}
@using SnWebApplication.Models
@model TaskViewModel
<h2>@ViewBag.Title</h2>
<h3>@ViewBag.Message</h3>
<div class="row">
<div class="col-md-8">
<section id="loginForm">
@using (Html.BeginRouteForm("Default", new RouteValueDictionary
{
{"controller", "Dashboard"},
{"action", "Delete"},
{ "Id", Model.Id }
}, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
<div class="form-group">
@Html.LabelFor(m => m.DisplayName, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Model.DisplayName
</div>
</div>
<div class="form-group">
@Html.LabelFor(m => m.AssignedToText, new { @class = "col-md-2 control-label" })
<div class="col-md-10">
@Model.AssignedToText
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Delete" class="btn btn-default" />
@Html.MvcActionLink("Cancel", "Index", "Dashboard")
</div>
</div>
}
</section>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment