2011-11-05 195 views
1

我有以下短標記。 我嘗試通過visual studio 2010「在瀏覽器中查看此頁面」,但它在超時時失敗。 有人可以看到爲什麼嗎?Aspx頁面拒絕渲染

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

代碼背後,是

namespace TB.Site 
{ 
    public partial class Add : System.Web.UI.Page 
    { 
     protected void Page_Load(object sender, EventArgs e) 
     { 
     } 
    } 
} 
+0

如果按F5進行調試,會發生什麼情況? – Lloyd

+1

你的標記並沒有真正與代碼隱藏進行交互,所以在這個頁面上本身不應該有任何問題。你在做什麼Global.asax?您如何在Visual Studio中設置此項目的屬性? – jwiscarson

+0

@jwiscarson其他aspx頁面在同一個項目中工作正常。 –

回答

0

還是不知道它是什麼。 在另一臺機器上打開相同的解決方案,並看到在Add.aspx上的黃色錯誤 按組件打開一個新的aspx和複製的組件 - 它的工作原理。

2

在一個新的項目,你的頁面加載罰款。這導致我相信在添加頁面定義的地方還有一些代碼,可能在重命名的文件中。

做一個搜索

public partial class Add 

看它是否在另一個文件中出現。

+0

只在代碼behinde和相關的aspx.designer –