MVC: Send lots of strings to controller

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

    MVC: Send lots of strings to controller

    Hi.

    I'm working on a page (ASP.NET MVC) where you should be able to send
    an email to some or all of our customers.

    First you should chose the recipients (on various views) and then be
    linked to the view where you can write the message.

    The thing is that you'll probaly end up having 50-500 recipients, so
    having an action like this one:

    public ActionResult Compose(string recipients) { }
    ....is bad because I would end up with URLs like:
    http://...../Message/Compose?recipie...;mail2@aa.com;...
    ....or something like that. Not so pretty when theres 500 emails.

    Is there a way to parse an array to the action or how can you handle
    this problem?

    Thanks in advance.
    - Tommy
  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Send lots of strings to controller

    Just because it is not the traditional ASP.NET model does not mean you
    cannot cache information on the server side and use it in other pages in the
    application. You do not have to do everything by URL.

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

    Subscribe to my blog


    or just read it:


    *************** *************** **************
    | Think outside the box! |
    *************** *************** **************
    "thj" <tommy@holmjako bsen.dkwrote in message
    news:v55qa4po14 9m0kb0ni4n4dgeu 257h3el2p@4ax.c om...
    Hi.
    >
    I'm working on a page (ASP.NET MVC) where you should be able to send
    an email to some or all of our customers.
    >
    First you should chose the recipients (on various views) and then be
    linked to the view where you can write the message.
    >
    The thing is that you'll probaly end up having 50-500 recipients, so
    having an action like this one:
    >
    public ActionResult Compose(string recipients) { }
    ...is bad because I would end up with URLs like:
    http://...../Message/Compose?recipie...;mail2@aa.com;...
    ...or something like that. Not so pretty when theres 500 emails.
    >
    Is there a way to parse an array to the action or how can you handle
    this problem?
    >
    Thanks in advance.
    - Tommy

    Comment

    Working...