My question simply is, how could the TempData be passed between Different controller? Naturally, because the controller contexts are different one controller should not be able to access the tempdata in another while tempdata can be simply passed between Action Results within the context of a single controller.
But let's say the situation necessitates cross controller communication OVER TempData, and TempData would be a requirement (regardless of whether it is a good practice or bad practice), is this possible ?
Yes it is possible since TempData is backed by SessionState. It's essentially a special case of session state with a shorter lifespan.
Here is a similar question/answer Passing data between different controller action methods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With