我的.cshtml文件中的操作链接如下:
@Html.ActionLink("Reply", "Post_Reply", new { item.ID, item.Post_ID, item.Reply_ID })
我的控制器中的方法如下:
[Authorize]
public ActionResult Post_Reply(int PostId=0, int Id = 0, int ReplyId = 0)
{
post posts = new post();
posts.ID = Id;
return View(posts);
}
但只有item.ID的值被传递, 另外两个值item.Post_ID和item.Reply_ID没有被传递。 可以有人指导一下吗? 谢谢。