C# Aspx页拒绝呈现

C# Aspx页拒绝呈现,c#,asp.net,C#,Asp.net,我有以下简短的标记。 我试图通过VisualStudio2010“在浏览器中查看此页面”,但超时时失败。 有人知道为什么吗 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="TB.Site.Add" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org

我有以下简短的标记。 我试图通过VisualStudio2010“在浏览器中查看此页面”,但超时时失败。 有人知道为什么吗

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="TB.Site.Add" %>

<!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>

    <label for="Author">Author</label>
<input type="text" id="Author" runat="server" />
<br />
<label for="Email">Email</label>&nbsp;
<input type="text" id="Email" runat="server" />
<br />
<label for="TextArea1">Text</label>
    <textarea id="TextArea1" cols="20" dir="ltr" name="S1" rows="2"  runat="server"></textarea> 
<br />
    <br />

<label id="output" runat="server"></label>

    </div>
    </form>
</body>
</html>

在新项目中,页面加载良好。这让我相信,您还有一段代码,其中定义了Add页面,可能是在一个重命名的文件中

搜索

public partial class Add 

看看它是否出现在另一个文件中。

仍然不知道它是什么。 在另一台计算机上打开相同的解决方案,并在Add.aspx上看到黄色错误
打开一个新的aspx并按组件复制componenet—它可以正常工作。

如果按F5进行调试会发生什么情况?您的标记不会真正与后面的代码交互,因此此页面上不会出现任何问题。你在Global.asax做什么?您是如何在Visual Studio中设置此项目的属性的?@jwiscarson同一项目中的其他aspx页面工作正常。下面是一个有用的疑难解答技巧:不断删除内容,直到成功。事实上,我会立即尝试删除除
之外的所有标记。
public partial class Add