ASP.NET MVC RouteTable question

L

laziers

Hi,
Anyone know how to set the RouteTable to do some think like this:

solution explorer:

+Views
---+Products
-----+List.aspx
-----+Add.aspx
---+Clients
------+List.aspx
---+Cms <---
------+News
---------+List.aspx

here we have a directory cms, that have news directory, with List.aspx
file

when I write url: site/cms/

the error appear:

Could not find an ASPX view at '~/Views/News/List.aspx'.

ok I understand why, but what I must do, to redirect to directory: '~/
Views/Cms/News/List.aspx'

?
 
C

Cowboy \(Gregory A. Beamer\)

You need to add another branch in your route and order it so it gets fired
first. This new route takes in account the Cms folder. To make it simple,
you can name this a News controller, although it seems you have a bit of the
basics of mapping down.

Without seeing more, I am just shooting fish in the dark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top