Why do I keep getting the error above for the following code<BR><BR><%<BR>if CType(Session("blnCCH"),boolean) = True then<BR>%><BR><html><BR>some more html code<BR><BR>Thanks in advance<BR>
Well what is happening is the Session has timed out and the Session variable is now blank, so it is having a problem converting that to a boolean.<BR><BR>Would it be better to convert it to a string as below to avoid this problem?<BR><BR>if CType(Session("blnCCH"),string) = "True" then
maybe. it'd be better to ensure that if the session has timed out and the variable has been lost that you don't allow this code to run in the first place. redirect users off to wherever it gets set and set it again, otherwise what's the point?