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(int id) //controller window.location.href = "@Url.Action("CreatePerson", "Person")?Id='+Id+'";
it's working fine passing parameter.