zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Asp.net判断变量是Null值还是空值的几种方法!

NetASP方法变量 判断 几种 还是 null
2023-09-11 14:15:10 时间

一种是从sql server中读取字段为Null值。

    if (temp_CustomsNo == null)
        {
                         
        }

一种是无空格值

    if (temp_CustomsNo == "")
        {
                         
        }

或者

    if (temp_CustomsNo..Length)
        {
                         
        }