.net - ASP.NET MVC 5 and Session -


is there .net 4.5+ asp.net mvc 5 way of initializing session variable when user makes request first time application?

is there wrong doing this?

if (session["key"] == null)    session["key"] = value; 

that seems accomplish you're looking for.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -