I'm developing an application for a company that sell some produts and this application is responsable for manage products changes and returns. There are different rules for changes and returns but the "screens/views" are all the same. This application must have a different URLs for each type. for example:
www.company.com/change
www.company.com/return
the application need to have a Login
page too.
When I access www.company.com/CHANGE the user is redirected to login page and in this page have a label with change
text.
When I access www.company.com/RETURN the user is redirected to login page and in this page have a label with return
text.
The question is: How to persist this type through pages, reminding that if the user is inside the authentication area of application and logout, He has to return to the right login page, with correct label text.
I tried to store the type in Session, but if the session over, it's impossible to know how parameter i have to pass to Login page (Change or Return)
I tried too, create a new route in Global.asax
like to persist the type, like that:
routes.MapRoute(
"qwert", // Route name
"{type}/{controller}/{action}/{id}", // URL with parameters
new { controller = "Login", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
But this url for example: "xxx/home/list" match and i would like that just
return/abc/abc
and
change/abc/abc
to match.
I will persist a record in database with this type, in the end of the process.
How can I solve this situation?