if(ViewState["doSearch"]!=null) VB写法

解决方案 »

  1.   

    if not viewstate("dosearch") is null then
    if not string.isnullorempty(viewstate("dosearch")) then自己注意区分大小写
      

  2.   

    if not viewstate("dosearch") is nothing then
      

  3.   

    If Not viewstate("dosearch") = Nothing Then
      

  4.   

    VB中的Is 关键字与C#一样,用于测试表达式的运行时类型是否与给定类型兼容
    用法与VB6不一样了
      

  5.   

    sorry,不好意思说错了,Is还是运算符
      

  6.   

    Click the link to solve your problem.Good luck!