2013-03-01 91 views
0

IV加入我的“customPages”文件夹“检查”,然后我添加了一个新的Web窗体页名为“秀”asp.net动态数据的新的自定义页面错误NOT FOUND

的“检查”文件夹内内的新文件夹
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="show.aspx.cs" Inherits="DynamicData_CustomPages_Check_show" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
    bla bla la 
    </div> 
    </form> 
</body> 
</html> 

当我尝试从其他网页它不会工作ERROR导航它:28889/CRC /检查/ show.aspx

The resource cannot be found. 
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /CRC/Check/show.aspx 

任何想法,为什么?


编辑:iv甚至将它设置为我的起始页我右键单击,但仍找不到页面?

回答

0

你说你添加了一个名为List的WebForm,所以不要使用show.aspx,你应该尝试list.aspx。

+0

对不起,我的错误,这是一个错字,它实际上被称为表演。 il在编辑中纠正它谢谢 – John 2013-03-01 19:42:55

0

如果您new folder是比urlcustompages文件夹shoould是这样

YourApplication/customPages/Check/show.aspx

我认为你缺少customPages文件夹

+0

玩过所有仍然不能得到它 – John 2013-03-01 20:00:01

+0

另外一个工作的例子是'Diary_Documents'文件夹是在自定义页面内,所以http:// localhost:28889/CRC/Diary_Documents/Details.aspx工作正常,但无法找到CRC/Check/show.aspx – John 2013-03-01 20:03:03

+0

CRC是您的应用程序名称,那么URL中的custompages在哪里? – 2013-03-01 20:05:41

0

开放的Global.asax

应该有这样的事情:

routes.Add(new DynamicDataRoute("{table}/{action}.aspx") { 
      Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }), 
      Model = model 
     }); 

在动作列表中添加“显示”。