2012-11-01 129 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。出于某种原因,这工作。