Users Pricing

forum

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

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

Anonymous User 2598 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?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md