I am using a session variable to store a date however, on rare occasions there is no value for the date so I get an empty string return value instead of a date. How do I check to see if I'm getting a date or a string when I try to use the session variable?
kraznodar
Contributor
3333 Points
883 Posts
How to determine datatype of session variable?
Mar 12, 2012 08:22 PM|LINK
I am using a session variable to store a date however, on rare occasions there is no value for the date so I get an empty string return value instead of a date. How do I check to see if I'm getting a date or a string when I try to use the session variable?
sinedyip
Member
308 Points
154 Posts
Re: How to determine datatype of session variable?
Mar 12, 2012 08:26 PM|LINK
Cast to an object and then use GetType.
http://msdn.microsoft.com/en-us/library/system.object.gettype.aspx
I hope this can help you