Understanding Route Order in ASP.NET MVC
Routing
I was having problems with a URL and my controller recognizing it and found out that where you add the route within global.aspx.cs is very important.
Routing
I was having problems with a URL and my controller recognizing it and found out that where you add the route within global.aspx.cs is very important.
PROBLEM:
To be able to get all Blog data and Categories data into a view, both of which are stored in a database.
SOLUTION:
Add a Categories method to the Blog model which will pull all Categories associated with the Blog.
I added the below code to my Blog Model.