Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for NULL or 0 at the same time
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Check for NULL or 0 at the same time
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01329868
Message ID:
01329868
Vues:
59
Hi everybody,

I have a variable that can be either 0 or NULL or some integer value. Is there a way to check for both conditions 0 and NULL without using OR condition (no LINQ, please, I want compatibility with .NET 2.0)

I have currently

(DataBinder.Eval(Container.DataItem, "SpouseID").ToString() != "") which works correctly for NULL, but doesn't work for 0.

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform