c# - how can i change-hide controller name from url in asp.net MVC -
i'm working on project using mvc-5. when run application, i'm getting url: http://192.169.235.120/home/home
, want this: http://192.169.235.120/home
so possible in mvc-5
you either change route stated in ahmad's answer or rename action index. mvc automatically routes http://{host}/controllername/actionname
; in case seems action "home" on controller "home". rename action "home" "index" , you'll able acces http://{host}/home
, don't forget rename view well.
Comments
Post a Comment