When i try to check Session["userId"] != null
why i get this message Possible unintended reference comparrison; to get value comparrison; cast left hand side to string
Any suggestion....
Session[key]
returns an object, not a string - you should be casting it to string rather than relying on implicit casting or ToString() functionality.
if(Session["userId"]!=null)
{
}
works just fine for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With