I want to do this , but I also want to pass arrays to the query string. I tried things like:
http://www.sitename.com/route?arr[]=this&arr[]=that
http://www.sitename.com/route?arr[]=this&that
http://www.sitename.com/route?arr[0]=this&arr[1]=that
http://www.sitename.com/route?arr0=this&arr1=that
http://www.sitename.com/route?arr=this&arr=that
And my route in C # code looks like this:
[Route("route")]
[HttpGet]
public void DoSomething(string[] values)
{
}
But in all these cases, the values are always zero when they fall into C # code. Why do I need a query string to pass an array of strings?
source
share