ASP.NET MVC RouteTable question

ASP.NET MVC RouteTable question

am 08.04.2008 21:29:49 von 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'

?

Re: ASP.NET MVC RouteTable question

am 10.04.2008 22:15:43 von NoSpamMgbworld

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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
wrote in message
news:93095e38-954c-483d-af14-9d33c3c6e971@n14g2000pri.google groups.com...
> 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'
>
> ?