8

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?

1
  • Session and Viewstate bai Rob :D Commented Jun 1, 2011 at 11:17

2 Answers 2

6

There is no direct equivalent (that is, data that is only passed to the next page).

You can use Session and clear it out on the receiving page.

Sign up to request clarification or add additional context in comments.

Comments

-2

You can use either Session or Viewstate to pass data between pages in ASP.NET application.

5 Comments

ViewState between pages? I don't think so.
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.
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.
@eugeneK: I'll be passing some query strings to the called page so Server.Transfer is a no.
Then you can save in Cache and Application but this will be global to all application users, so use Session for user specific data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.