how to check value is null or not

Discussion in 'ASP General' started by vinodkus@gmail.com, Feb 6, 2008.

  1. Guest

    dear sir/madam
    how to check any value in asp that it is null or not
    Thanks in advance
     
    , Feb 6, 2008
    #1
    1. Advertising

  2. 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"
     
    Bob Barrows [MVP], Feb 6, 2008
    #2
    1. Advertising

  3. 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/library/ky6fyhws(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.
     
    Dave Anderson, Feb 6, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GS
    Replies:
    3
    Views:
    14,210
    Luke Dalessandro
    Jan 15, 2006
  2. Replies:
    5
    Views:
    26,691
    Mike Schilling
    Mar 29, 2006
  3. G Fernandes
    Replies:
    9
    Views:
    597
    DHOLLINGSWORTH2
    Feb 27, 2005
  4. Col
    Replies:
    1
    Views:
    627
    peter koch
    Apr 21, 2006
  5. Mike
    Replies:
    12
    Views:
    716
    Daniel Pitts
    Sep 26, 2008
Loading...

Share This Page