timjs
04-30-2007, 03:43 AM
Hi,
How do I check if an ASP.net session contains a particular variable or not? I want to do something like this.
if Session("user") <> "" Then
'... do something here...
End if
I do not know the type of the data that is stored in Session("user"). I just want to know if anything has been assigned to it.
The above causes an error:
Overload resolution failed because no Public '<>' can be called with these arguments:
'Public Shared Operator <>(a As String, b As String) As Boolean':
Argument matching parameter 'a' cannot convert from 'SchedulerUser' to 'String'.
I hope someone can help!
How do I check if an ASP.net session contains a particular variable or not? I want to do something like this.
if Session("user") <> "" Then
'... do something here...
End if
I do not know the type of the data that is stored in Session("user"). I just want to know if anything has been assigned to it.
The above causes an error:
Overload resolution failed because no Public '<>' can be called with these arguments:
'Public Shared Operator <>(a As String, b As String) As Boolean':
Argument matching parameter 'a' cannot convert from 'SchedulerUser' to 'String'.
I hope someone can help!