Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIf not working as expected?
Message
 
 
À
14/06/2006 11:59:09
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01129039
Message ID:
01129066
Vues:
13
Thanks Keith.

>>The following line is not working as expected:
>>
>>
>>Dim lcImpDate As String  = IIf(IsStringBlank(Trim(Request.Form("txtImpDate").Replace("/",""))),"",FormatDateSubmit(Request.Form("txtImpDate")))
>>
>>
>>IsStringBlank() and FormatDateSubmit() are other functions in my class. The IsStringBlank() IS returning true, but the FormatDateSubmit() function is still being called even though it is in the "false" part of the IIf. Any ideas what I'm missing here?
>>
>>Thanks,
>>KP
>
>Kevin,
>
>That behavior is normal for IIf. You have to use an If..Then with AndAlso or OrElse to get short-circuit evaluation.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform