@model RoleResponse
@* Generated from Custom MVC Template. *@
@*
Model namespace using directive should be added to
_ViewImports.cshtml.
*@
@{
var containerDivClass = "container";
// "container-fluid" can be used for full width
}
@{
/*
ViewBag and ViewData are the same collection (dictionary).
They carry extra data other than the model from a
controller action to its view, or between views.
The value assigned will be shown in
Views\Shared\_Layout.cshtml view's title tag of
the head tag.
*/
ViewData["Title"] = "Role Delete";
}
<div class="@containerDivClass">
<h1>@ViewData["Title"]</h1>
<hr />
</div>
@if (Model is not null)
{
<div class="@containerDivClass">
@if (TempData["Message"] is not null)
{
/*
TempData is used to carry extra data to the redirected
controller action's view.
*/
<p class="text-danger">
@TempData["Message"]
</p>
}
<h3 class="text-danger">Are you sure you want to delete?</h3>
<hr />
<div class="row mb-3">
<div class="col-2 fw-bold">
@Html.DisplayNameFor(model => model.Name)
</div>
<div class="col-10">
@Html.DisplayFor(model => model.Name)
</div>
</div>
@*
Can be uncommented and used for many to many relationships,
"entity" may be replaced with the related entity name in the
controller and views.
Raw HTML Helper is used in case string parameter may have
HTML tags.
*@
@*
<div class="row mb-3">
<div class="col-2 fw-bold">
<b>@Html.DisplayNameFor(model => model.Entitys)</b>
</div>
<div class="col-10">
@Html.Raw(Model.Entitys)
</div>
</div>
*@
<hr />
<form asp-action="Delete">
@Html.AntiForgeryToken()
<input type="hidden" asp-for="Id" />
<input type="submit" value="Yes" class="btn btn-danger" />
<a asp-action="Index" class="btn btn-outline-danger">No</a>
</form>
</div>
}