TimCodes.NET
TimCodes.NET

Reputation: 4699

ASP.NET page level variable

What's the best way (if there is a way) to define a variable for use by controls on one page, but should be disposed of after navigating away from that page? Is there anything like HttpContext.Current.Items that only persists per page?

Upvotes: 0

Views: 3580

Answers (1)

walther
walther

Reputation: 13600

There's a thing called Viewstate http://msdn.microsoft.com/en-us/library/ms972976.aspx

that may provide the functionality you want. If not, try to be more specific on how do you want to use those variables.

Upvotes: 2

Related Questions