you donβt need to pass the full name of HomeController , In Url.Action() we need to pass the controller name prefix when we create the controller, we need to add the Controller postfix to mvc and when we use this in helpers, we just need to pass the controller name without Controller postfix:
public class HomeController: Controller { public ActionResult doctorsview() { return PartialView("~/Views/_Doktor.cshtml", new Doktor()); } }
Do the following:
$("#someDiv").load('@Url.Action("doctorsview","Home")');
and you have to put it in the appropriate directory of views of Controller, which in this case is Views β Home
source share