forum

Home / DeveloperSection / Forums / How can I set a route for a controller without a default action in MVC 5?

How can I set a route for a controller without a default action in MVC 5?

Anonymous User 2248 28-Sep-2013

I have the following:

routes.MapRoute(

    "Account",
     url: "{controller}/{action}/{id}",
     defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
    );

However I don't want to specify a default action. Is there a way to do this for my MVC5 application?


Updated on 28-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By