String is not null, empty, or empty string

后端 未结 6 812
礼貌的吻别
礼貌的吻别 2021-01-04 07:18

What is the quickest and easiest way (in Classic ASP) to check if a string has some string (that has a length greater than 0) i.e. NOT \"Null\", \"Nothing\", \"Empty\", or \

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-04 07:45

    <%
    Dim x,y
    x = "abcdefg"
    
    'counting length of string
    y = Len(x) 
    Response.Write (y)
    
    
    'checking string is empty or not
    If Len(x) = 0 then 
    Response.Write ("

    String is empty

    ") Else Response.Write ("

    String is not empty

    ") End If %>

    Hope this is helpful.

提交回复
热议问题