Passing an array of values in UrlAction I need to pass an array of values in Url.Action.

Currently I'm doing:

var redirectUrl = Url.Action("search", new {   
        q = criteria.Q,
        advanced = criteria.Advanced,
        salaryfrom = criteria.SalaryFrom,
        salaryto = criteria.SalaryTo,
    });

if (criteria.JobTypes != null)
    redirectUrl += criteria.JobTypes.Aggregate(string.Empty, (a, x) =&gt; a += "&amp;jobTypes=" + x);


To give me something like:

/search?q=developer&amp;advanced=false&amp;salaryfrom=20000&amp;salaryto=80000&amp;jobTypes=Full%20Time&amp;jobTypes=Contract


Is there a nicer/cleaner approach?
Concerning the comment you got about passing an ID, note that it's better to put search parameters in the URL, since it allows users to link to that search and refresh the page without having issues. All search engines do that.
Make sure to test for null without using type coercion: if(criteria.JobTypes !== null). It's a best practice that will avoid you a few surprises.
As for passing an array of values, I don't know much about ASP.NET but it looks like you can pass an array of values with Html.ActionLink. I don't know what version you're using but this seems specific to ASP.NET MVC 2.