I have an ASP NET MVC application that is multi-client and multi-user, that is, it is prepared to be used by multiple clients and each client can have multiple users.
Initially, the login form has the text entry for the client code. However I want to perform some routing so the user can inform the client code directly in the URL, I know that using the default routing I can get this code by taking the value of the id parameter in the controller, however this works only on the first page if some redirection is performed I can not get this information.
How do I implement this? below my RouteConfig class:
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute("Default", "{controller}/{action}/{id}",
new {controller = "Acesso", action = "Login", id = UrlParameter.Optional});
}
}