ASP.NET MVC - Pass array object as a route value within Html.ActionLink(...)
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2009-04-04T19:46:35Z
Indexed on
2010/05/30
3:22 UTC
Read the original article
Hit count: 951
I have a method that returns an array (string[]) and I'm trying to pass this array of strings into an Action Link so that it will create a query string similar to:
/Controller/Action?str=val1&str=val2&str=val3...etc
But when I pass new { str = GetStringArray() } I get the following url:
/Controller/Action?str=System.String%5B%5D
So basically it's taking my string[] and running .ToString() on it to get the value.
Any ideas? Thanks!
© Stack Overflow or respective owner