Is there a cap or best practice with regards to how much data should be placed in the TempData dictionary?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check this post that describes best practices when using TempData:
When to use ViewBag, ViewData, or TempData in ASP.NET MVC 3 applications
This one goes even further:
ASP.NET MVC: Do You Know Where Your TempData Is?
Bottom line is: By default, TempData is stored in the Session object. So the limit is the limit of your Session object. See this post for some insight.
Things to consider:
For a more in-depth view of the Session object, check this doc at MSDN:
ASP.NET Session State Overview