mvc RedirectToAction 传递参数
可能的重复:
带参数的RedirectToAction
我在控制器主页中,在 ActionResult Id 中,其中包含字符串名称列表 从方法中获取返回值。我想使用该列表进行 RedirectToAction (Id2)。在视图中-> Id2 该列表名称 get 的 ViewData 为 null,不包含填充的 Itemsn 列表。如何从一个 actionResult 重定向到另一个传递参数的 actionResult 的另一个视图?
Possible Duplicate:
RedirectToAction with parameter
I am in controller home, in ActionResult Id which has a list of string name get returned from a method. I want to RedirectToAction (Id2) using that list. In View -> Id2 the ViewData of that list name get is null, doesn;t contain the list of the Itemsn populated. How can I redirect from an actionResult to another view of another actionresult passing parameter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样使用
如果有多个参数,则:
如果只有 id 作为参数,则:
Use like this
If there are more than one parameters then:
If you have only id as parameter then: