c# - Multiple controller matching the request in attribute based routing asp.net MVC -


this regarding how define routes in controller of asp.net mvc

1st controller

[allowanonymous] [route("contact/login")] public actionresult login(string returnurl) {     viewbag.returnurl = returnurl;     return view(); } 

2nd controller

[route("{categoryurl}/{keywords}")] public actionresult browseproducts(string categoryurl, string keywords) {  } 

i getting below error if try access url abc.com/contact/login

multiple controller types found match url. can happen if attribute routes on multiple controllers match requested url. request has found following matching controller types: abc.controllers.accountcontroller abc.controllers.coursescontroller

my question is, want validate {categoryurl} input's , want access url "abc.com/contact/login"


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -