开发者

Getting null value in controller when passing the list through routvalues (html.action)

When i pass list through routevalues in "Html.Action" I am always getting null value in controller. But when i pass interger,string or bool i am getting the correct value.

How to pass list through routevalues?

My View is

@Html.Action("ViewTeam", "ProjectTeamManagement", new { Team = @Model.ProjecTeam})

The controller is

    public ActionResult ViewTeam(List<Pro开发者_开发技巧jectTeam> Team)
    {
        return PartialView("ViewTeam",Team);
    }


I think the problem is that the html.action will have the "Get" Method... It is not possible to pass the list to the Get method through routevalues. We should use Ajax Post method to pass the list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜