asp.net mvc部分视图的action中获取父级视图信息
RouteData.DataTokens["ParentActionViewContext"]中包含了父级视图的相关信息,如路由等
public ActionResult Child() { var parentView = RouteData.DataTokens["ParentActionViewContext"] as ViewContext; //或
var parentView = ControllerContext.ParentActionViewContext; return View(); }