public void DoLogin()
        {
            string strname = Request.Params["txtname"];
            string strpassword = Request.Params["txtpassword"];
            if (adbll.DoLogin(strname, strpassword))
            {
                Response.Redirect("../Admin/main.html");//这里跳过去页面找不到
            }
            else
            {
                Response.Write("<script>alert('登陆失败!');history.go(-1);</script>");
            }
 
        }
    }

解决方案 »

  1.   

    名字和位置都正确?
    或者换个方法,不用redirect
    太久不用MVC了,忘记了,我记得有至少2种办法跳转呢
      

  2.   

    这个不可能
    跳转上静态页面跟aspx一样  
      

  3.   

    public void DoLogin() 返回一个ActionResult 给Viewpublic ActionResult DoLogin()
    {
      return Redirect("~/index.html");
    }
      

  4.   

    想跳转到Views文件夹中的静态页面 当然不行。这个文件夹的url,都是要跟路由匹配的。
    把你的 main.html 建在Views文件夹 外面。