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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -