I have a function CreatePerson(int id) , I want to pass id from @Url.Action.
CreatePerson(int id)
id
@Url.Action
Below is the reference code:
pub
Try this
public ActionResult CreatePerson(string Enc) window.location = '@Url.Action("CreatePerson", "Person", new { Enc = "id", actionType = "Disable" })'.replace("id", id).replace("&", "&");
you will get the id inside the Enc string.