ASP.NET MVC ... Two Lists. Need Advice ...

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a post controller with the following actions: Create / Insert,
Destroy / Delete, Edit / Update. These take care of the CMS part.

I have two other actions:

- Show: displays a detailed post to the site visitor.

- List: display a list of posts in the CMS.

Now I need to display a list of posts to the user but in a different
format. How can I do this?

I already have an action so probably I am not able to create two
actions with the same name ...

I tried to add to Home / Article view a component named List which
control is ComponentController.

However, when I use the pager on this list I go to:
http://localhost:3145/Component/List?Page=2 instead of:

http://localhost:3145/Home/Article/List?Page=2

Could someone advice me on this?

Now that all my CMS is done I got stopped on this.

Thanks,

Miguel
 
One direction would be correct your routes, but I wonder why it is not
possible to do something like:

http://localhost:3145/Article/List?Page=2

You then have a home controller, an article controller and a component
controller. This keeps things a bit simpler, as you do not have to mess with
routes (at least not yet) and it gives you the features you need to build.
It also gives you a way to add CRUD for article and component without any
strangeness.

Perhaps I am missing something?

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

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top