I am using asp.net Mvc3
I have 2 controllers in two different projects.
HomeController in HomeProject and
WorkController in WorkProject
i need to call Work controller and its view from Home Project’s Home Controller.
Something similar to:
public ActionResult Home()
{
ViewBag.work = "Work/work/";
return View(ViewBag.work);
}
But don’t know how exactly to do it
can somebody help with this??
You can’t do it using what’s provided to you by the mvc framework (Html.Action etc.). The framework was not designed to handle this scenario (nor should it).
You can treat it as an external link, provided you are willing to hardcode the address of the work server:
By the way, if you’re asking this, you’re doing something wrong. (Have you tried using areas?)