Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

CBool

The CBool function is one of the many ASP conversion functions for converting a variant into a boolean value. A boolean value holds the value true or false. It cannot hold any other value.

If an error occurs converting a value to boolean, the script will throw a runtime error. To avoid this, you can trap the error using an error handler as follows:

Dim sValue
Dim bValue

sValue = "True"
On Error Resume Next
bValue = CBool(sValue)
If Err.Number <> 0 Then
    Response.Write "Error converting value to boolean: " & sValue
End If
On Error Goto 0

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"I only regret that I have one life to lose for my country." - Nathan Hale

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.