Hi I have a problem with some of my session variables Can you please tell me what is the best way to know if the session has any value in it or it is empty? I cannot find something like If IsNothing(Session("myVar")) then ... End if Please help Sri
depends what you store in it, they're not strongly typed. So for strings initialise to "" for numerics "-1" or something like that
If Session("myvar") Is Nothing Then ........... End If Code (markup): or... If Session("myvar") IsNot Nothing Then ............. End If Code (markup):
oh, that's with asp.net ... unsure of if it works with classic. but with asp classic you should just be able to do: If Session("myvar") <> "" Then ...