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

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
 
C

Cowboy \(Gregory A. Beamer\)

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?
 

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,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top