I was going through some links and found something new to me,
DotNetInterviewQuestion at question number 3.
Does "TempData" preserve data in the next request also?
"TempData" is available through out for the current request and in the subsequent request it's available depending on whether "TempData" is read or not.
So if "TempData" is once read it will not be available in the subsequent request.
my question is if TempData
uses session
internally ,then why this was done to TempData
,why isn't it left like session
?
when Each visitor has its own session collection
which is created on first request and destroyed when session expires
,then why it differs in TempData
!!
i dont want to know answer about session vs tempdata
?all i want why Tempdata has variation if it use session internally,becuase either built in .net must clears the session , so why .net added this features of tempdata,albit it can be done with existing session.