Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for NULL or 0 at the same time
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Check for NULL or 0 at the same time
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01329868
Message ID:
01329868
Views:
58
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
Next
Reply
Map
View

Click here to load this message in the networking platform