Hi
How to open Partial View in Modal Popup on click of button.. Can we pass Action ("Delete") & Controller ("Location") thru variables
so that same Delete Partial View can be used whereever it is required.
Partial View
*************
@using (Html.BeginForm("Delete", "Location", FormMethod.Post))
{
}
Sachin SinghPosted Jun 21, 2021, 10:44 AM
Ramco RamcoPosted Jun 21, 2021, 10:24 AM
Sachin SinghPosted Jun 21, 2021, 10:16 AM
Ramco RamcoPosted Jun 21, 2021, 10:04 AM
Sachin SinghPosted Jun 21, 2021, 9:09 AM
Ramco RamcoPosted Jun 21, 2021, 8:43 AM
Sachin SinghPosted Jun 21, 2021, 8:34 AM
class
="modal-danger">Delete ConfirmationAre you sure you want to delete this record ?
Ramco RamcoPosted Jun 21, 2021, 8:30 AM
Hi Sachin
AnyDiv was not defined . MOdal Poup is opening but when i click on Delete i gets below error
The required anti-forgery cookie "__RequestVerificationToken" is not present.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Mvc.HttpAntiForgeryException: The required anti-forgery cookie "__RequestVerificationToken" is not present.
In place of form tag can't we use @using (Html.BeginForm).
Thanks
Sachin SinghPosted Jun 21, 2021, 8:21 AM
Ramco RamcoPosted Jun 21, 2021, 8:16 AM
Hi
Now when i have put href="#" in anchor tag then it has gone in Js function. Modal popup has not opened yet
Thanks
Sachin SinghPosted Jun 21, 2021, 7:19 AM
Ramco RamcoPosted Jun 21, 2021, 7:12 AM
Delete Confirmation
Are you sure you want to delete this record ?
Sachin SinghPosted Jun 21, 2021, 6:59 AM
Asma KhalidPosted Jun 21, 2021, 6:01 AM
Sachin SinghPosted Jun 21, 2021, 5:22 AM
step 1. Change the partial view as
create a common controller for common functionalities and return the partial view
step 3. Call it using ajax and change the action attribute of form as