为 stu.aspx 执行子请求时出错。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Web.HttpException: 为 stu.aspx 执行子请求时出错。源错误: 
行 55:  private void Button1_Click(object sender, System.EventArgs e)
行 56:  {
行 57:  Server.Transfer("stu.aspx");
行 58: 
行 59:  }
 源文件: e:\sxcomputer\webapplication1\index.aspx.cs    行: 57 堆栈跟踪: 
[HttpException (0x80004005): 为 stu.aspx 执行子请求时出错。]
   System.Web.HttpServerUtility.ExecuteInternal(String path, TextWriter writer, Boolean preserveForm) +1765
   System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) +24
   System.Web.HttpServerUtility.Transfer(String path) +27
   WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in e:\sxcomputer\webapplication1\index.aspx.cs:57
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1292 
--------------------------------------------------------------------------------

解决方案 »

  1.   

    这段代码没有错,是不是 stu.aspx 出错了呢?
      

  2.   

    http://community.csdn.net/Expert/topic/2899/2899006.xml?temp=.6700251
      

  3.   

    Server.Transfer("stu.aspx");
    上面代码对的,stu.aspx对不对?
      

  4.   

    从你目前所贴出的代码看,应该是你的 stu.aspx页的代码有问题
      

  5.   

    上面的几位楼主,如果是stu.aspx文件中有错的话,CLR就不会提示源文件: e:\sxcomputer\webapplication1\index.aspx.cs    行: 57 
    错误了,应该还是你index.aspx.cs 这个文件中的错误,你可以看一下http://community.csdn.net/Expert/topic/2899/2899006.xml?temp=.6700251
    这个贴子里的方法试一下。