How to change starting page, using Razor Pages in .NET Core 2?

后端 未结 4 1431
我寻月下人不归
我寻月下人不归 2020-12-20 13:37

I wanted to set my starting page to /Members/Index.

When I was using MVC, I configured it as following:

app.UseMvc(routes =>
            {
              


        
4条回答
  •  既然无缘
    2020-12-20 14:11

    Try following code at AppStart->RouteConfig.cs :

     routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}",
                defaults: new { controller = "Members", action = "Index"}
            );
    

提交回复
热议问题