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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shapper

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

    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 ComponentContro ller.

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



    Could someone advice me on this?

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

    Thanks,

    Miguel
  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: ASP.NET MVC ... Two Lists. Need Advice ...

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



    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


    or just read it:


    *************** *************** **************
    | Think outside the box! |
    *************** *************** **************
    "shapper" <mdmoura@gmail. comwrote in message
    news:0279bd1b-cfeb-4d03-bc21-795075fcedcc@26 g2000hsk.google groups.com...
    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 ComponentContro ller.
    >
    However, when I use the pager on this list I go to:
    http://localhost:3145/Component/List?Page=2 instead of:
    >

    >
    Could someone advice me on this?
    >
    Now that all my CMS is done I got stopped on this.
    >
    Thanks,
    >
    Miguel

    Comment

    Working...