How to display the warning message in mvc ?


while working in mvc we will get scenario to display the alert or warning message while deleting or editing the record, then we can achieve that functionality by using this code as given below

// Alert message for edit record
@Html.ActionLink("Edit","Index",new {Id=item.Id},new { onclick = "return confirm('Are you sure do you want to edit the record ?');" })
// Alert message for delete the record.
@Html.ActionLink("Delete","Delete",new {Id=item.Id},new { onclick = "return confirm('Are you sure you wish to delete this record "+@item.Id +"?');" })