无法找到资源。 
说明: HTTP 404。您正在查找的资源(或者它的一个依赖项)可能已被移除,或其名称已更改,或暂时不可用。请检查以下 URL 并确保其拼写正确。 请求的 URL: /WebSite2/~/index.aspx
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.5448; ASP.NET 版本:2.0.50727.5420 
我想从页面A跳转到页面B,于是在页面A的form属性的action选择了页面B(页面AB都在同一个工程里面的)。
然后按了按钮跳转,失败。
求解

解决方案 »

  1.   

    你的路径肯定是错误的了
    /WebSite2/~/index.aspx
    不能这样写的
    <a href="~/index.aspx">你需要改成
    <a href="<%=Page.ResolveUrl("~")%>index.aspx">
      

  2.   

    或者代码写
    Response.Redirect("~/index.aspx")
      

  3.   

    /WebSite2/~/index.aspx你的这个路径是不对的,你检查下看看这个两个页面是不是在同一层,要是的话,就直接用Response.Redirect("index.aspx")。如果不是的话,就用Response.Redirect("~/index.aspx")
      

  4.   

    这个是程序自己生成的。在页面A的form属性的action选择了页面B,于是增加了action这一项
    <form id="form1" runat="server" action="~/index.aspx">之后我把action删除了,只有代码Response.Redirect(“index.aspx”)这样就行了~
    为什么的呢?
      

  5.   

    <form id="form1" runat="server" action="~/index.aspx">
    改成
    <form id="form1" runat="server">