Passing multiple parameters from url to html.actionlink
Finally, you need pass two parameters to the view:
Index action:
public ActionResult Index(int id, int memberid)
{
...
ViewBag.cafID = id;
ViewBag.personID = memberid;
return View();
}
Index.cshtml
@Html.ActionLink("Create New", "Create", "PersonCAFDetail", new { id=ViewBag.cafID , memberid =ViewBag.personID}, null)
And Check your route syntax... id = @"\d+"
routes.MapRoute(
name: "PersonCAFDetail",
url: "PersonCAFDetail/Create/{id}/{memberid}",
defaults: new { controller = "PersonCAFDetail", action = "Create", id = @"\d+", memberid = @"\d+" }
);