1.调用
<!--底部菜单--> @Html.Action("Index", "ItemPublic", new { userId = 1, itemTypeId = 4, itemId = ViewBag.Id })
2.定义
public class ItemPublicController : Controller { /// <summary> /// /// </summary> /// <param name="itemTypeId">项目类型id</param> /// <param name="itemId">项目id</param> /// <param name="userId">用户id</param> /// <returns></returns> public ActionResult Index(int itemTypeId, int itemId, int userId) { ViewBag.ItemTypeId = itemTypeId; ViewBag.ItemId = itemId; ViewBag.UserId = userId; return View("~/Views/Shared/ItemFoot.cshtml"); } }