Last post Aug 05, 2008 08:25 AM by DkUltra
Aug 01, 2008 09:34 PM|cplusplus1|LINK
Is there a best way to write an if condition other than this using vb.net, i have several condition in my form would like use something more efficient:
If Session("AccessLevel") <> 1
AndAlso Session("AccessLevel") <> 6
AndAlso Session("AccessLevel") <> 9 Then
Thanks for the info.
Aug 01, 2008 10:21 PM|sambeetpatra|LINK
Nope, I would think you are writing it the correct way. Another approach would be to use Select Case, but to me, this is much better.
Aug 05, 2008 08:25 AM|DkUltra|LINK
I agree with sambeetpatra that your current if statment is good, but a person could elimate calling the session object very time.
Hope this helps