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?

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
maztt
  • 12,278
  • 21
  • 78
  • 153

2 Answers2

0

TempData vs. Session has been covered before:

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.)

Community
  • 1
  • 1
David
  • 208,112
  • 36
  • 198
  • 279
0

Sounds like what your looking for is something simular to ViewState. Model binding is what you want to look at in MVC.

LCarter
  • 473
  • 7
  • 13