I'm having a moment.  I can't seem to get the selected items from a ListBox to be bound in a parameter to the action method that handles the post event.

Model is of type SystemRoleList:

public class SystemRoleList {
    public IEnumerable&lt;SystemRole&gt; List { get; set; }
}


SystemRole is defined as:

public class SystemRole {
    public Int32 Id { get; set; }

    public String Name { get; set; }
}


This code generates the ListBox:

&lt;%: this.Html.ListBox("Roles", new SelectList(Model.List, "Id", "Name")) %&gt;


The action method receiving the selected items is set up like this:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UpdateSystemRoles(Int32[] roles) {
    // do something with the results....
}


The trouble is that roles is always null.  I've tried using other data types - string[], ICollection&lt;int&gt;, and so on.  I can see the values in the Request.Form collection if I do Request.Form["Roles[]"].  Typical values might be 1,3,4 if I selected those items from the ListBox.

How can I name either the ListBox or my parameter so that MVC will automatically bind the values?


Question: where to put .sty and .cls file for project
Answer: At the top level of the TeX Live distribution there is a texmf.cnf file that you can edit, if you don't want to set environment variables; the usual value for TEXMFHOME is, with an vanilla TeX Live

TEXMFHOME = ~/texmf


which stands for a texmf folder in your home. With the MacTeX installed TeX Live it is

TEXMFHOME = ~/Library/texmf


This kpathsea variable can be set to whatever you prefer:

TEXMFHOME = {~/Library/texmf,/Volumes/Dropbox/texmf}


would make TeX programs search also the texmf folder (which should be organized as a TeX tree) in the disk called Dropbox. You should know the precise path to give. Assuming this, you can put your classes and packages inside 

/Volumes/Dropbox/texmf/tex/latex/myproject


(choose a better name) and all users that modify accordingly the texmf.cnf file on their machines will be able to access the tree.

Launching TeX programs as, say,

TEXMFHOME=:/Volumes/Dropbox/texmf// pdflatex filename


would be equivalent (notice the initial colon that means "append" the new tree after the value stated in texmf.cnf and the trailing // to mean "search recursively). Such a setting of TEXMFHOME can be of course stated in the overall environment. The texmf.cnf way is safer, as it doesn't depend on shell setup; the extra tree will be ignored if not found on the system.