I created an area that will handle our some common things in all our development products, just like magazines, HTML helpers, etc. Inside the area, I have a partial view that I'm trying to reference outside the area. I registered the area with
public class Routes : AreaRegistration
{
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"Common_default",
"Common/{controller}/{action}/{id}",
new {
controller = "Account",
action = "Index",
id = UrlParameter.Optional
});
}
public override string AreaName
{
get { return "MvcCommons"; }
}
}
And now in a normal project, I'm trying to reference a view in the MvcCommons area ...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>TestGrid</h2>
<% Html.RenderPartial("jQGridTable", ViewData.Model); %>
But I always understand that the submission was not found. Previously, when I created the MVC Commons project, I got viewing errors, but errors told me that it was viewed both in the area folders and in the default view folders. This time I get only the default folders. Is there any way to do this?
Thanks everyone!