.

解决方案 »

  1.   

    string str=string.Empty;;
    try
    {
    str="存在";
    Session["name"].ToString();
    if(Session["name"]==null)
    {
    str="空值";
    }
    }
    catch
    {
    str="不存在";
    }
    this.Response.Write("<script>alert('"+str.ToString()+"')</script>");
      

  2.   

    if (session["name"]!=null)---存在
    {
       do something}
      

  3.   

    if(session["name"]==null)
    {  错误,,,
      response.end
    }
      

  4.   

    在C#中的空最好是用null !!!
      

  5.   

    if(Session["name"]==null)
    {
        ?????
    }
    else
    {
      if(Session[""].toString()=="")
      {
      }
    }
      

  6.   

    if(session["name"]==null)
    {
    }
      

  7.   

    我在vb.net中好像用的是 if (session("name") is nothing) then .     不知道在c#中是什么..不好意思..
      

  8.   

    if(Session["name"]==null)
    {
        try
          {
             代码、
           }
    Catch(Excption rR )

       错误提示。

    }
      

  9.   

    为什么,我使用了,还是运行检查不出呢?http://www.haiyu.org