tags:

views:

23

answers:

1

tempdata variables works like a session variables?

basically i want to do is to when the form loads for the first time the variables should be empty. but the variable should be persisted until i am on that form.

the form contains searching with a submit button as well as the paging .

basically my ques is to use what approach should i use?

A: 

TempData vs. Session has been covered before:

http://stackoverflow.com/questions/1500402/when-to-use-tempdata-vs-session-in-asp-net-mvc

I'm not quite sure I follow the rest of your question, though. But I suspect that link may provide you with enough information for more research on the subject to make a more informed decision. (It may also get you closed as a duplicate. I would have put it in a comment, but wanted to be more verbose.)

David