Topic: Bug using asp.net Ajax UpdatePanel or TabContainer

It seems there's a bug with the UpdatePanel (I get a javascript error)
I add a TabContainer with an UpdatePanel that is not wrapping the Tinymce control.

Here's a minimal code where you can see the error.
To get the error, just add some content on the tinymce control, click on the link "Test", goto the Item container, and click on the "Test" button.

Do you have any idea how to fix this problem ?

here's the code.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register TagPrefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>
<!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">

    <script src="js/tiny_mce/tiny_mce_src.js" type="text/javascript"></script>

    <form id="form1" runat="server">
        <asp:ScriptManager ID="SM" runat="server" />
        <cc1:TabContainer ID="TabNews" runat="server">
            <cc1:TabPanel ID="TabComposition" HeaderText="Item" runat="server">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                            <asp:TextBox ID="nom" runat="server"></asp:TextBox>
                            <asp:Button ID="btn" Text="test" runat="server" />
            <cc1:TabPanel ID="TabCategories" runat="server" HeaderText="Tiny">
                    <table style="width: 100%;">
                            <td colspan="3" style="width: 100%; border: 1px solid #fabd37; padding: 10px;">
                                Titre<br />
                                    <asp:Label ID="etitre" runat="server" /></strong>
                    <div style="float: left; text-align: center; width: 100%; margin: 10px 0">
                        <tinymce:TextArea ID="elm1" theme="advanced" InstallPath="js/tiny_mce/" plugins="safari,style,table,advhr,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,noneditable,visualchars,nonbreaking,xhtmlxtras,template, imagemanager "
                            theme_advanced_toolbar_location="top" theme_advanced_toolbar_align="left" theme_advanced_path_location="bottom"
                            Width="800" Height="400" runat="server" />
                    <p style="text-align: right;">
                        <a href="#" onclick="alert('test')">Test</a>


Re: Bug using asp.net Ajax UpdatePanel or TabContainer

Not sure...but I use ACT TabContainer (without UpdatePanel though) and TinyMCE seems to work fine (except for the spellcheck which timesout - but only on IIS, not when using VS development server).

One thing, I don't use the <script src="js/tiny_mce/tiny_mce_src.js" type="text/javascript"></script> at all?! Just using <tinymce:TextArea> seems to be enough for me? Any special reason to use <script> aswell?!?


Re: Bug using asp.net Ajax UpdatePanel or TabContainer

ok, in fact if I add ValidateRequest="false"  it works.
I don't know if it's the best way..


Re: Bug using asp.net Ajax UpdatePanel or TabContainer

I think ValidateRequest="false" needs to be set because if it's not postbacks that contains <tagged> data won't work...It's a security feature of IIS to dissallow potentially malicious code being injected....Glad to hear all works fine for you...Have you maybe tried using the spellchecker plugin?

Last edited by nubie (2008-08-14 13:08:34)


Re: Bug using asp.net Ajax UpdatePanel or TabContainer

No I don't use for now the spellchecker. If I will (not in my plan) I will you inform you.