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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -