How to set default route in asp.net mvc application from web.config
Ask Question
By
Junaid A
25-Apr-2024
2
How to set default route in asp.net mvc application from web.config
Solution:
Add Key web.config as below
<add key="DeafaultPageAfterLogin" value="/MyOrderedMeals" />
in controller or route.config file set redirect url to
if (ConfigurationManager.AppSettings["DeafaultPageAfterLogin"]!=null)
{
return Redirect(ConfigurationManager.AppSettings["DeafaultPageAfterLogin"].ToString());
}
in else part you can set default route.
Solutions
Jack Carter
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
you can view the more detail via link https://www.youtube.com/watch?v=HpZgwHU1GcIChing xang
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
Danial Comb
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!
Jack Carter
2 hours agoi think that some how, we learn who we really are and then live with that decision, great post!