2012-11-01 78 views
0

我正在編寫一個使用HTMLEditorExtender的Web應用程序。我調用使用下面的代碼是:HTMLEditorExtender未正確加載Server.Transfer

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true" /> 
    <asp:TextBox ID="htmlTextBox" runat="server" TextMode="Multiline" Width="90%" Rows="25" /> 
    <asp:HtmlEditorExtender ID="htmlEditorExtender" TargetControlID="htmlTextBox" runat = "server" EnableSanitization="false" > 
    <Toolbar> 
      <asp:Undo /> 
      <asp:Redo /> 
      <asp:Bold /> 
      <asp:Italic /> 
      <asp:Underline /> 
      <asp:ForeColorSelector /> 
      <asp:FontNameSelector /> 
      <asp:FontSizeSelector /> 
      <asp:JustifyLeft /> 
      <asp:JustifyCenter /> 
      <asp:JustifyRight /> 
      <asp:JustifyFull /> 
      <asp:InsertOrderedList /> 
      <asp:InsertUnorderedList /> 
      <asp:CreateLink /> 
      <asp:UnLink /> 
    </Toolbar> 
    </asp:HtmlEditorExtender> 

注:我知道這是不好的設置EnableSanitization =「假」,但這個應用程序將只被私下使用。

與該代碼,加載網頁時,文本框看起來像這樣:

看起來不錯!

但是,在我的應用程序中,我導航到另一個頁面,然後需要使用Server.Transfer(page_URL)導航回到此頁面。當我這樣做,HTMLEditorExtender不再正確加載,我得到的東西看起來是這樣的:

我怎樣才能得到它正確加載的Server.Transfer的()?我在想這可能是一個簡單的標誌,我需要調用HTMLEditorExtender元素的創建,但我已經嘗試了一些,並且無法獲得任何工作。

編輯:我要補充一點,我使用的IE 8,它必須努力在IE 8

+0

在FireFox中使用FireBug,你看到任何腳本或其他請求被拒絕? –

+0

@Brian使用firefox,應用程序有不同的視覺錯誤。左上角的「取消」白色框不在那裏。它只是一個空的文本框。我在firebug中看到的唯一可能有用的是「TypeError:Sys.Extended is undefined」。 – Brandon

回答

0

我改變使用Server.Transfer的()停止並決定設立一項PostBackUrl在ASP。出於某種原因,這工作。