tri_inn

tri_inn

  • NA
  • 1.2k
  • 235.3k

ASP.Net MVC: How to configure route and action method to han

Apr 3 2017 10:23 AM

i have one problem that i have to show list of category and a specific category information as per url.

say when the url will look like www.mysite.com/learn/designpatterns/ then i need to show list of article names whose category is design pattern and when url would look like below one

www.mysite.com/learn/designpatterns/template-method-design-pattern-c-sharp then i have to show text about template-method-design-pattern-c-sharp in same view

so tell me how could i design my controller and action method name and how to configure custom route for this. can i do it by single action or do i need to have separate action method for this.

one guy said the url routing would look like  example.com/learn/designpatterns/{articleId}/{slug}
 
does it mean learn will be my controller name and designpatterns would be my action method name ?
 
guide me how to handle this situation best way ? thanks

Answers (3)