Il 11/02/2010 11.18, Evertjan. ha scritto:
>> session("external_user") = RS1.Fields.Item("external_user").Value
>> >
>> > It is a boolean field. I'm trying to get it using this syntax
>> >
>> > <%if (session("external_user") = "1") Then %> > No need for the outermost ().
>
> You are comparing a bolean to a string, why?
> No, sorry, it's an absent-minded mistake =)
> If it is a bolean:
>
> <% If session("external_user") Then %>
> Ok, thank you very much, but after some tests I realize that maybe it is
notnot so safe.
If someone sets by mistake session("external_user") = 123
the previous solution will not raise any error, but this one will do it
If ( CBool(session("external_user")) )
do you agree?