簡體   English   中英

“頁面”之后的客戶端渲染問題。 來電

[英]Client Rendering Problem after 'page.' calls

我已經嘗試過“ PreviousPage”,“ PreviousPage.IsCrossPagePostBack”,“ Page.previousPage”,page.title

這會導致客戶端在此行之后停止呈現頁面。

簡單的例子

protected void Page_Load(object sender, EventArgs e)
{
response.write("I can see this");
string test = PreviousPage.IsCrossPagePostBack.toString(); //Any page call Causes client rendering to freeze
response.write("But i cant see this");   
System.Windows.Forms.MessageBox.Show("However i can see this,proving that the server is still running the code");   
}

任何人,有什么想法嗎?

回答

好吧,它最終變得有些愚蠢。 代碼聞起來了。

我用來觸發PostBack的按鈕具有觸發重定向的處理程序,我只是刪除了該處理程序,保留了PostBackUrl設置和魔力。

您是否檢查過PreviousPage是否為null?

來自msdn

當用戶直接從服務器請求該頁面時,PreviousPage屬性是一個空引用(在Visual Basic中為Nothing)。

另外-Web窗體中的MessageBox 並不是一個好主意...也許使用內置的trace.axd

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM