. onRequestEnd. , . 1 , 1 1 .
ViewBag , CRUD, .
Viewbag ...
@if (ViewBag.Alert == "Success")
{
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Record has been successfully added.</strong>
</div>
}
@if (ViewBag.Alert == "Deleted")
{
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Record has been successfully deleted.</strong>
</div>
}
@if (ViewBag.Alert == "Updated")
{
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Record has been successfully updated.</strong>
</div>
}
, , , , javascript....
<script>
function onRequestEnd(e)
{
var operationType = e.type;
if(operationType == "destroy" || operationType == "create" || operationType == "update")
{
location.reload();
}
}
</script>