Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want my project to load from Index page.I have all the pages created i want to integrate it with ASP.NET MVC project.
Since i am a naive person into AngularJs not aware of integrating things.
Can someone please help me on this.

Please let me know if any more details are required.
Currently it is picking up the normal MVC routing URL

What I have tried:

for routing purpose i have put the following in Web.config under Views folder

C#
<add name="JavaScriptHandler" path="*.js" verb="*" precondition="integratedMode" type="System.Web.StaticFileHandler" />

      <add name="HtmlScriptHandler" path="*.html" verb="*" precondition="integratedMode" type="System.Web.StaticFileHandler" />


Also,
the following in RouteConfig file for routing.
C#


public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            routes.MapRoute(
                name: "HomeCatchAllRoute",
                url: "Home/{*.}",
                defaults: new
                {
                    controller = "Home",
                    action = "Index",
                    id = UrlParameter.Optional
                }
            );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
Posted

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