In ASP.NET MVC, there's a TempData which can pass data one time from one page to another. What's the equivalent for this in ASP.NET?
2 Answers
You can use either Session or Viewstate to pass data between pages in ASP.NET application.
5 Comments
Oded
ViewState between pages? I don't think so.Oded
I suggest you read the article. He is using
Server.Transfer. This is not the same a loading a new page or doing a redirect.eugeneK
Oded, will it do what @rob waminal asks for or not. I'm not discussing about Responce.Redirect versus Server.Transfer when in this case you right they are different.
rob waminal
@eugeneK: I'll be passing some query strings to the called page so Server.Transfer is a no.
eugeneK
Then you can save in Cache and Application but this will be global to all application users, so use Session for user specific data.