Hi,
I have below code . Can delete part be called thry Partial View so i have to write it every Controller View. I want marked part to be called thru Partial View
@foreach (var item in Model.Locations)
{
@Html.DisplayFor(model => item.Id)
@Html.DisplayFor(model => item.Description)
@if(item.IsActive)
{
}
else
{
}
Edit
@if (item.IsActive)
{
data-target="#[email protected]" style='margin-left:5px'> Delete
}
else
{
Delete
}
@using (Html.BeginForm("DeleteLocation", "Location", new { id = item.Id }, FormMethod.Post, null))
{
@Html.AntiForgeryToken()
}
}
Thanks
Ramco RamcoPosted Jun 17, 2021, 3:37 PM
Sachin SinghPosted Jun 17, 2021, 12:53 PM
Sachin SinghPosted Jun 17, 2021, 10:53 AM
class
="modal-danger">Delete ConfirmationAre you sure you want to delete this record ?
Ramco RamcoPosted Jun 17, 2021, 10:52 AM
Arnab MukherjeePosted Jun 17, 2021, 10:41 AM
Ramco RamcoPosted Jun 17, 2021, 10:31 AM
Hi Sachin
Can u pls Help with Code.
Thanks
Sachin SinghPosted Jun 17, 2021, 10:10 AM