ASP Session variables: Is “” same as IsEmpty?
问题 In ASP an uninitialized Session variable Is Empty. I know that the correct way to check for a Session value, and remove a value, is the following: IF NOT IsEmpty(Session("myVar")) THEN ' Go ahead and use Session("myVar") ... ' Now if we're all done with myVar then remove it: Session.Contents.Remove("myVar") END IF I've inherited a codebase where Application and Session variables are typically set = "" after use, and all tests for a value are of the form (Sessions("myVar") = "") . This test