开发者

TempData to redirected page?

开发者 https://www.devze.com 2023-03-02 15:22 出处:网络
Can I send tempdata to a redirected page? if yes how? if no, any alternativ开发者_运维问答e?You can use TempData to persist data from one request to another when using Redirect() and RedirectToAction(

Can I send tempdata to a redirected page? if yes how? if no, any alternativ开发者_运维问答e?


You can use TempData to persist data from one request to another when using Redirect() and RedirectToAction()

This MSDN article explains it all.

If you want your page to display this data then you just need to pass it to your view from your action.


TempData will persist for two jumps, while ViewData only persists for one. That is the simplest way I can explain it.

0

精彩评论

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

关注公众号