Top "Tempdata" questions

TempData is a dictionary used in C# MVC to pass data between different controllers or different actions.

TempData keep() vs peek()

What is the difference between keep() and peek()? MSDN says: keep(): marks the specified key in the dictionary for retention. …

asp.net-mvc tempdata
Using Tempdata in ASP.NET MVC - Best practice

I am using ASP.NET MVC 3 to build a web application. What I am trying to do is pass values …

asp.net-mvc asp.net-mvc-3 asp.net-mvc-2 tempdata
When to use TempData vs Session in ASP.Net MVC

I am trying to get the hang of MVC framework so bear with me. Right now, the only thing I'm …

asp.net-mvc session tempdata
How to check TempData value in my view after a form post?

I fill my TempData from a FormCollection and then I try to check the value of my TempData in my …

asp.net-mvc if-statement view tempdata
ASP.NET MVC - TempData - Good or bad practice

I'm using the AcceptVerbs method detailed in Scott Gu's Preview 5 blog post for dealing with form entries in ASP.NET …

asp.net-mvc tempdata
access tempdata in javascript in mvc4

I am trying to access TempData in Javascript. but getting null value. I am making ajax call to Update the …

javascript asp.net-mvc asp.net-mvc-4 tempdata
MVC C# TempData

Can somebody please explain the purpose of TempData in MVC. I understand it behaves like ViewBag but what does it …

c# asp.net-mvc tempdata
Store complex object in TempData

I've been trying to pass data to an action after a redirect by using TempData like so: if (!ModelState.IsValid) { …

c# asp.net-core asp.net-core-mvc tempdata
How can I disable session state in ASP.NET MVC?

I would like to have a very lightweight ASP.NET MVC site which includes removing as many of the usual …

asp.net-mvc session-state tempdata
ASP.NET MVC exception handling

Is it OK to catch my exceptions in the controller's actions? Is there any better way of doing it? I'm …

asp.net-mvc exception-handling tempdata