MVC C#PagedList-PagedListPager将int数组作为参数传递

问题描述 投票:0回答:1

我不知道如何传递一个int数组。让我们看看我的代码...

@Html.PagedListPager(Model, pagina => Url.Action("Index", new
{

    pagina,
    codOccu = ViewBag.codOccu, // the array of int
    nomeEmp = ViewBag.Empresas,
    dtAbert = ViewBag.DataIni,
    dtFinal = ViewBag.DataFim,
    codStatus = ViewBag.codStatus,
    codUsu = ViewBag.CodUsu,
    codSet = ViewBag.CodSet,
    order = ViewBag.order

}))

并且查询字符串的结果看起来像http://localhost:8080/Atendimento?pagina=2&codOccu=System.Int32%5B%5D&codStatus=0&codUsu=0&codSet=0&order=1

我需要一种将codOccu = System.Int32%5B%5D&转换为codOccu = 123&codOccu = 1234&codOccu = 12345

c# asp.net-mvc pagedlist
1个回答
0
投票

我也面临同样的问题,无法将数组作为MVC IPagedList中的查询字符串传递。

这种情况可以解决吗?

© www.soinside.com 2019 - 2024. All rights reserved.