asp.net mvc - use different name in area url in mvc -



asp.net mvc - use different name in area url in mvc -

i have created area named "user" in mvc project. can access area using url mysite.com/user.

now can alter name of area in url ? want access area using url mysite.com/admin

i can changing folder name of "user" area. need modify lot of files if alter folder name. there other way show different name in url ? using arearegistration.cs ?

in userarearegistration file set this:

public class userarearegistration : arearegistration { public override string areaname { { homecoming "admin"; } } public override void registerarea(arearegistrationcontext context) { context.maproute( "admin_default", "admin/{controller}/{action}/{id}", new { controller = "home", action = "index", id = urlparameter.optional } ); } }

and point controller/action etc want.

asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-mvc-3-areas areas

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -