Why isn't viewbag value passing back to the view?

前端 未结 4 1223
傲寒
傲寒 2020-12-11 02:08

straight forward question , can\'t seem to get my viewBag value to display in a view that the user is directed to after completing a form.

Please advise..thanks

4条回答
  •  长情又很酷
    2020-12-11 02:54

    RedirectToAction causes an HTTP 302 response, which makes the client make another call to the server and request a new page.

    You should be returning a view instead of redirecting.

提交回复
热议问题