.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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -