Tôi có một liên kết như thế này:
 <a href='Member/MemberHome/Profile/Id'><span>Profile</span></a>và khi tôi nhấp vào nó, nó sẽ gọi trang này một phần:
 @{
    switch ((string)ViewBag.Details)
    {
        case "Profile":
        {
           @Html.Partial("_Profile"); break;
        }
    }
}Trang một phần _Profile chứa:
Html.Action("Action", "Controller", model.Paramter) Thí dụ:
@Html.Action("MemberProfile", "Member", new { id=1 })   // id is always changingTôi nghi ngờ là làm thế nào tôi có thể chuyển "Id" này cho phần model.parameter ?
Bộ điều khiển của tôi là:
 public ActionResult MemberHome(string id)
    {
        ViewBag.Details = id;
        return View();
    }
  public ActionResult MemberProfile(int id = 0)
    {
        MemberData md = new Member().GetMemberProfile(id);
        return PartialView("_ProfilePage",md);
    }