locked
AjaxControl Toolkit 15.1 - Update Panel Child Triggers Stopped Working RRS feed

  • Question

  • User-1260039965 posted

    I just updated to AjaxControl Toolkit 15.1 and my UpdatePanel Child Triggers stopped working. Nothing was changed on the page. The code is exactly the same. If I move a button outside of the Update Panel or simply remove the Update Panel everything works, but not smoothly. However, all of the buttons or triggers inside the update panels do not work. What could be the issue with this new Toolkit? 

    A Tab Panel is inside the Update Panel too.

    UPDATE: I removed the tabs and the update panels and triggers work.

    <asp:Button ID="Button3" runat="server" Text="-" OnClick="DecreasePoemTextButton1_Click" CommandArgument="Smaller" />
     protected void DecreasePoemTextButton1_Click(object sender, EventArgs e)
        {
            if (LabelPoemText.Font.Size == 22) { LabelPoemText.Font.Size = 20; }
            else if (LabelPoemText.Font.Size == 20) { LabelPoemText.Font.Size = 18; }
            else if (LabelPoemText.Font.Size == 18) { LabelPoemText.Font.Size = 16; }
            else if (LabelPoemText.Font.Size == 16) { LabelPoemText.Font.Size = 14; }
            else if (LabelPoemText.Font.Size == 14) { LabelPoemText.Font.Size = 12; }
            else if (LabelPoemText.Font.Size == 12) { LabelPoemText.Font.Size = 10; }
            else if (LabelPoemText.Font.Size == 10) { LabelPoemText.Font.Size = 8; }
            else if (LabelPoemText.Font.Size == 8) { LabelPoemText.Font.Size = 6; }
        }
        protected void Heading1_TextChanged(object sender, EventArgs e)
        {
            LabelPoemTitle.ForeColor = System.Drawing.ColorTranslator.FromHtml("#" + HeadingColor1.Text);
            HeadingColor1.ForeColor = System.Drawing.ColorTranslator.FromHtml("#" + HeadingColor1.Text);
            HeadingColor1.BackColor = System.Drawing.ColorTranslator.FromHtml("#" + HeadingColor1.Text);
        }
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true">
            <ContentTemplate>
                <div class="column1"> 
                    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1" Width="100%" CssClass="MyTabStyle">
                        <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Enter Poem or Quote">
                            <HeaderTemplate>
                                Enter Text
                            </HeaderTemplate>
                            <ContentTemplate>
                                <asp:Button ID="Button7" runat="server" Text="Update Text" OnClick="Button6_Click" ValidationGroup="poem" />
                                <p>
                                    <b>Enter Title (Not Required)</b><br />
                                    <asp:TextBox ID="TextBox_PoemTitle" runat="server" Width="400px"></asp:TextBox>
                                </p>
                                <p>
                                    <b>Enter Poem or Quote <span style="color: #006600">(Required)<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox_Poem" Display="Dynamic" ErrorMessage="Required" Font-Bold="True" ForeColor="#CC0000" SetFocusOnError="True" ValidationGroup="poem"></asp:RequiredFieldValidator>
                                    </span></b>
                                    <br />
                                    <asp:TextBox ID="TextBox_Poem" runat="server" TextMode="MultiLine" Height="300px" Width="400px" ValidationGroup="poem"></asp:TextBox>
                                </p>
                                <p>
                                    <b>Enter Author Name (Not Required)</b><br />
                                    <asp:TextBox ID="TextBox_Author" runat="server" Width="400px"></asp:TextBox>
                                </p>
                                <asp:Button ID="Button6" runat="server" Text="Update Text" OnClick="Button6_Click" ValidationGroup="poem" />
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Edit Text Attributes">
                            <HeaderTemplate>
                                Change Text Layout, etc.
                            </HeaderTemplate>
                            <ContentTemplate>
                                <div id="tabs-1" style="line-height: 250%">
                                    <strong>Move Text:</strong>
                                    <asp:Button ID="MoveDown" runat="server" OnClick="MoveDown_Click" Text="Down" />
                                    <asp:Button ID="MoveUp" runat="server" OnClick="MoveUp_Click" Text="Up" />
                                    <h3>Heading Text</h3>
                                    <asp:Button Text="B" runat="server" OnClick="btnBoldHeading_Click" ID="btnBold"></asp:Button>
                                    <asp:Button Text="I" ID="btnItalic" OnClick="btnItalicHeading_Click" runat="server"></asp:Button>
                                    <asp:Button ID="DecreaseHeading" runat="server" Text="-" OnClick="DecreaseHeadingButton1_Click" CommandArgument="Smaller" /><asp:Button ID="IncreaseHeading" runat="server" Text="+" OnClick="IncreaseHeadingButton1_Click" CommandArgument="Bigger" />
                                    &nbsp;<asp:ImageButton ID="ImageButton_AlignLeft" runat="server" Height="16px" ImageUrl="~/images/align_left.gif" Width="16px" OnClick="ImageButton_AlignLeftHeading_Click" />
                                    &nbsp;<asp:ImageButton ID="ImageButton_AlignCenter" runat="server" Height="16px" ImageUrl="~/images/align_center.gif" Width="16px" OnClick="ImageButton_AlignCenterHeading_Click" />
                                    &nbsp;<asp:ImageButton ID="ImageButton_AlignRight" runat="server" Height="16px" ImageUrl="~/images/align_right.gif" Width="16px" OnClick="ImageButton_AlignRightHeading_Click" />
                                    &nbsp;Color:
                <asp:TextBox runat="server" ID="HeadingColor1" MaxLength="6" OnTextChanged="Heading1_TextChanged" Width="20px" AutoPostBack="True" BackColor="White" /><asp:ImageButton runat="server" ID="HeadingImage1" Style="margin: 0 3px" ImageUrl="~/images/cp_button.png" AlternateText="Click to show color picker" /><asp:Button ID="HeadingRefresh1" runat="server" Text="update" />
                                    <br />
                                    <ajaxToolkit:ColorPickerExtender ID="defaultCPE" runat="server" OnClientColorSelectionChanged="colorChanged" TargetControlID="HeadingColor1" PopupButtonID="HeadingImage1" Enabled="True" />
                                    <asp:DropDownList runat="server" ID="ddlHeadingFonts" OnSelectedIndexChanged="ddlHeadingFonts_SelectedIndexChanged" AutoPostBack="True">
                                        <asp:ListItem Value="Arial, Helvetica, sans-serif">Arial</asp:ListItem>
                                        <asp:ListItem Value="Arial Black, Gadget, sans-serif">Arial Black</asp:ListItem>
                                        <asp:ListItem Value="Comic Sans MS, cursive, sans-serif">Comic Sans MS</asp:ListItem>
                                        <asp:ListItem Value="Impact, Charcoal, sans-serif">Impact</asp:ListItem>
                                        <asp:ListItem Value="Lucida Sans Unicode, Lucida Grande, sans-serif">Lucida Sans Unicode</asp:ListItem>
                                        <asp:ListItem Value="Tahoma, Geneva, sans-serif">Tahoma</asp:ListItem>
                                        <asp:ListItem Value="Trebuchet MS, Helvetica, sans-serif">Trebuchet MS</asp:ListItem>
                                        <asp:ListItem Value="Verdana, Geneva, sans-serif">Verdana</asp:ListItem>
                                    </asp:DropDownList>
                                    <hr />
                                    <h3>Main/Poem Text</h3>
                                    <asp:Button Text="B" runat="server" OnClick="btnBoldPoem_Click" ID="btnBold_Poem"></asp:Button>
                                    <asp:Button Text="I" ID="btnItalicPoem" OnClick="btnItalicPoem_Click" runat="server"></asp:Button>
                                    <asp:Button ID="Button3" runat="server" Text="-" OnClick="DecreasePoemTextButton1_Click" CommandArgument="Smaller" /><asp:Button ID="Button2" runat="server" CommandArgument="Bigger" OnClick="IncreasePoemTextButton1_Click" Text="+" />
                                    &nbsp;<asp:ImageButton ID="ImageButton2" runat="server" Height="16px" ImageUrl="~/images/align_left.gif" Width="16px" OnClick="ImageButton_AlignLeftPoem_Click" />
                                    &nbsp;<asp:ImageButton ID="ImageButton3" runat="server" Height="16px" ImageUrl="~/images/align_center.gif" Width="16px" OnClick="ImageButton_AlignCenterPoem_Click" />
                                    &nbsp;<asp:ImageButton ID="ImageButton4" runat="server" Height="16px" ImageUrl="~/images/align_right.gif" Width="16px" OnClick="ImageButton_AlignRightPoem_Click" />
                                    &nbsp;Color:
                <asp:TextBox runat="server" ID="PoemColor1" MaxLength="6" OnTextChanged="Poem1_TextChanged" Width="20px" AutoPostBack="True" BackColor="White" /><asp:ImageButton runat="server" ID="PoemImage1" Style="margin: 0 3px" ImageUrl="~/images/cp_button.png" AlternateText="Click to show color picker" /><asp:Button ID="Button5" runat="server" Text="update" />
                                    <br />
                                    <ajaxToolkit:ColorPickerExtender ID="ColorPickerExtender1" runat="server" OnClientColorSelectionChanged="colorChanged" TargetControlID="PoemColor1" PopupButtonID="PoemImage1" Enabled="True" />
                                    <asp:DropDownList runat="server" ID="ddlPoemFonts" OnSelectedIndexChanged="ddlPoemFonts_SelectedIndexChanged" AutoPostBack="True">
                                        <asp:ListItem Value="Arial, Helvetica, sans-serif">Arial</asp:ListItem>
                                        <asp:ListItem Value="Arial Black, Gadget, sans-serif">Arial Black</asp:ListItem>
                                        <asp:ListItem Value="Comic Sans MS, cursive, sans-serif">Comic Sans MS</asp:ListItem>
                                        <asp:ListItem Value="Impact, Charcoal, sans-serif">Impact</asp:ListItem>
                                        <asp:ListItem Value="Lucida Sans Unicode, Lucida Grande, sans-serif">Lucida Sans Unicode</asp:ListItem>
                                        <asp:ListItem Value="Tahoma, Geneva, sans-serif">Tahoma</asp:ListItem>
                                        <asp:ListItem Value="Trebuchet MS, Helvetica, sans-serif">Trebuchet MS</asp:ListItem>
                                        <asp:ListItem Value="Verdana, Geneva, sans-serif">Verdana</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>


    Wednesday, May 20, 2015 7:48 PM

Answers

  • User-1260039965 posted
    Yes, the pages won't even compile using the old script manager. That wasn't the problem.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 22, 2015 11:17 AM

All replies

  • User1644755831 posted

    Hello markpringle,

    UPDATE: I removed the tabs and the update panels and triggers work.

    I just updated to AjaxControl Toolkit 15.1 and my UpdatePanel Child Triggers stopped working. Nothing was changed on the page. The code is exactly the same

    We are glad that you have found a solution. but just to inform you. Starting with the v15.1 release, the ToolScriptManager has been removed due to various issues it caused. Use the standard ScriptManager.

    ToolkitScriptManager Removed in v15.1

    Change your ToolScriptManager to ScriptManager.

    Hope this Helps.

    With Regards,

    Krunal Parekh

    Friday, May 22, 2015 1:46 AM
  • User-1260039965 posted
    Yes, the pages won't even compile using the old script manager. That wasn't the problem.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 22, 2015 11:17 AM