Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 12, 2012 08:26 PM by sinedyip
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?
Mar 12, 2012 08:26 PM|LINK
Cast to an object and then use GetType.
object a = (object)Session["MYS"];
I hope this can help you