IIF (Immediate If Function)

Added By: rickychalmers

Rated:
(3 of 5) by 8.
Rate Snippet:
Description:  Improve maintainability of your asp code. The IIF Function can be used to improve the readability and maintainability of asp code, for example : IIF(bSomeBoolean, "CHECKED", "") IIF(aValue=bValue,"SELECTED", "") IIF(<Boolean Expression>, <Return if TRUE>, <Return if FALSE>) The function returns the value passed in the second parameter if the first parameter is TRUE, else it returns the value in the third parameter. If you have used the IIF in Excel, the parameters are the same.
Language:  Visual Basic Script

Save to web space
E-mail Link

Code Snippet: