0

iv 在我的“customPages”文件夹“Check”中添加了一个新文件夹,然后在“check”文件夹中添加了一个名为“show”的新 webform 页面

<%@ 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>

当我尝试从另一个页面导航它时它不会工作错误:28889/CRC/Check/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 甚至将它设置为我的起始页,我右键单击,但它仍然找不到该页面?

4

3 回答 3

0

您说您添加了一个名为 List 的 WebForm,因此您应该尝试使用 list.aspx 而不是 show.aspx。

于 2013-03-01T19:41:39.040 回答
0

打开 Global.asax

应该有这样的东西:

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

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

于 2013-11-04T14:01:49.990 回答
0

如果您new folder在您的custompages文件夹中,url则应该是这样的

YourApplication/customPages/Check/show.aspx

我认为您缺少customPages文件夹

于 2013-03-01T19:56:53.407 回答