how to check value is null or not

This is a discussion on how to check value is null or not within the Inetserver forums in Microsoft Tools category; dear sir/madam how to check any value in asp that it is null or not Thanks in advance...

Go Back   Application Development Forum > Microsoft Tools > Inetserver

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 02-06-2008, 06:11 AM
vinodkus@gmail.com
Guest
 
Default how to check value is null or not

dear sir/madam
how to check any value in asp that it is null or not
Thanks in advance
Reply With Quote
  #2  
Old 02-06-2008, 06:35 AM
Bob Barrows [MVP]
Guest
 
Default Re: how to check value is null or not

vinodkus@gmail.com wrote:
> dear sir/madam
> how to check any value in asp that it is null or not
> Thanks in advance


It depends on if you are using vbscript or jscript in your asp page. Please
do not fail to provide this information in future questions. I am going to
give you a "vbscript" answer and would be slighlty nettled to find out that
you are actually using jscript.

if somevariable is null then
'the variable contains a null
end if

You need the scripting documentation. You can get it here:
http://tinyurl.com/7rk6

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Reply With Quote
  #3  
Old 02-06-2008, 03:43 PM
Dave Anderson
Guest
 
Default Re: how to check value is null or not

vinodkus@gmail.com wrote:
> how to check any value in asp that it is null or not


JScript:

if (x === null) ...

Note that the Identity Operator does not treat "undefined" values the same
way as the equality operator:

var x // x is undefined
if (x == null) // true
if (x === null) // false

http://msdn2.microsoft.com/en-us/lib...ws(VS.85).aspx



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.