[英]MVC C# ActionLink with multiple “news”
How do I correct this so that the ActionLink reverts to http://localsite/forum/index/4
(where 4 is defined by the parent_id as shown below): 如何纠正此问题,以便ActionLink还原为http://localsite/forum/index/4
(其中4由parent_id定义,如下所示):
@Html.ActionLink("Cancel", "Index", "Forum", new { @class = "btn"}, new{ @id=ViewBag.parent_id })
Currently it reverts to: 目前它恢复为:
http://localhost:53731/Forum?class=btn
Thanks for your help, 谢谢你的帮助,
Mark 标记
看来您已经颠倒了论点。
@Html.ActionLink("Cancel", "Index", "Forum", new{@id=ViewBag.parent_id }, new { @class = "btn"})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.