>>>>>>>>>>另问:如何让session没有实例化时跳转错误页!

解决方案 »

  1.   

    if (Session["你的名字"] == null)
      Response.Redirect("Login.aspx");
      

  2.   

    if session("变量名")="" then
       response.Redirect "login.htm"
    end if
      

  3.   

    if(Session.Count<0)
    {
        Response.Redirect("Login.aspx");
    }
      

  4.   

    if (session["a"] == null)
    {
    // do something
    }
      

  5.   

    <customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>
      

  6.   

    if session("你的Session名")="" then
       response.Redirect "login.htm"
    end if
      

  7.   

    if(session["username"]==null)
    {
      Response.Redirect("Login.aspx");
    }-----------努力学习 不断实践 虚心讨教---------
      

  8.   

    ="" 和 =null 有什么区别吗

      

  9.   

    <script>
    setTimeout(1000 * 超时的秒数, "document.location.href='default.aspx';");
    </script
      

  10.   

    if (session["var"].Tostring()=="") 
     Response.Redirect("Login.aspx");
      

  11.   

    判断session没有实例化的方法用session["username"]==null
      

  12.   

    在页面的PAGE_LOAD中 
     IF SESSION("USERNAME")==NULL THEN
       RESPONSE.Redirect('LOGING.ASPX')
      END IF