How to check for null values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't seem to figure out the syntax for checking for null values in asp.net. Can anyone point me in the right direction? Also, is there a common area on the MSDN for syntax lookup?

Thanks!
 
Which type of null values? Normally you would check something like object !=
null, but if you're talking aboutnulls coming from a Database then you use
System.DBNull.Value to compare against. Also, don't forget that some strings
may not be null but instead string.Empty. It varies a little from language
to language though so don't look for ASP.Net and nulls, look for the
language that you are using such as C# or VB.Net

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

MattH said:
I can't seem to figure out the syntax for checking for null values in
asp.net. Can anyone point me in the right direction? Also, is there a
common area on the MSDN for syntax lookup?
 
Back
Top