开发者

TempData to redirected page?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜