tags:

views:

62

answers:

2

Hi everyone!

I'm new to developing web applications using the .NET framework. I'm just wondering if .NET has any support for saving a custom int value for each (logged in) user?

Could I perhaps use the HttpContext.User property or something?

I'd be really grateful for some help on this!

/Ylva

+2  A: 

You will want to look at the Session property on the HttpContext. The HttpSession returned by that property allows storage of values (through the indexer) which are scoped on the session level. This session is what is mapped to the individual user.

casperOne
A: 

Does it need to be persisted between sessions? Then you could check out the ASP.NET User Profile services - works very nicely, highly configurable.

See these articles on it:

Marc

marc_s