By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,967 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,967 IT Pros & Developers. It's quick & easy.

How to check for null values

P: n/a
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!
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <mh*******@systemsinsight.com> wrote in message
news:9D**********************************@microsof t.com...
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!

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.