ASP.NET removing an item from Session?

Is there a difference?

There is.
Session.Remove(key) deletes the entry (both key & value) from the dictionary while Session[key] = null assigns a value (which happens to be null) to a key. After the former call, the key won’t appear in the Session#Keys collection. But after the latter, the key can still be found in the key collection.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)