I use a child action in Home Controller like this:
[OutputCache(Duration=30)]
public ActionResult ChildAction()
{
Response.Write("Date Time is="+DateTime.Now);
return View();
}
Home.cshtml
<h2>About</h2>
<p>
@Html.Action("ChildAction")
</p>
but after run my asp.net mvc3.0 Project i get an error :
The view 'ChildAction' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/ChildAction.aspx
~/Views/Home/ChildAction.ascx
~/Views/Shared/ChildAction.aspx
~/Views/Shared/ChildAction.ascx
~/Views/Home/ChildAction.cshtml
~/Views/Home/ChildAction.vbhtml
~/Views/Shared/ChildAction.cshtml
~/Views/Shared/ChildAction.vbhtml
please help me how can i solve it thanks