Click here to Skip to main content
15,562,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using the areas in MVC my RouteConfig file has only the following route

C#
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          var route = routes.MapRoute(
              name: "Default",
              url: "{controller}/{action}/{id}",
              defaults: new { controller = "User", action = "LogIn", id = UrlParameter.Optional },
              namespaces: new[] { "Srd.Controllers" }
          );
          route.DataTokens["area"] = "Users";


Which is redirecting to "Users" area by default

my problem is in the view, I have the following action which is showing the error.

C#
@Html.Action("SetPermissions", "SetSession", new { Area = "" });


No route in the route table matches the supplied values.

Any help.
Posted
Updated 7-Nov-18 10:23am
v2

1 solution

hi you want use patrial view address into , return partialview("SetPermissions address")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900