ASP.NET MVC RouteTable question

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'

?
laziers [ Di, 08 April 2008 21:29 ] [ ID #1937822 ]

Re: ASP.NET MVC RouteTable question

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!
|
*************************************************
<laziers [at] gmail.com> wrote in message
news:93095e38-954c-483d-af14-9d33c3c6e971 [at] 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'
>
> ?
NoSpamMgbworld [ Do, 10 April 2008 22:15 ] [ ID #1939417 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » ASP.NET MVC RouteTable question

Vorheriges Thema: Login failed for user 'username' , Error: 18456, Severity: 14, State:
Nächstes Thema: problem in viewing MHTML report when it is Exported