locked
ToolkitScriptManager & UpdatePanel RRS feed

  • Question

  • User1679431224 posted

    Hi anyone,
    I have a strange problem with ToolkitScriptManager and UpdatePanel:
    Dev-Environment: Win7 x64, VS2012 with AjaxControlToolkit 4
    Target-Environment: Win2012 x64
    Target-Framework: .NET 4.0

    SourceCode:

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Test2012_3._Default" %>
    
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
    
    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
            <asp:Timer ID="Timer1" runat="server" Interval="1000">
            </asp:Timer>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick"></asp:AsyncPostBackTrigger>
                </Triggers>
            </asp:UpdatePanel>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:BalloonPopupExtender ID="TextBox1_BalloonPopupExtender" runat="server" BalloonPopupControlID="Panel1" CustomCssUrl="" Enabled="True" ExtenderControlID="" TargetControlID="TextBox1" DisplayOnFocus="True">
            </asp:BalloonPopupExtender>
            <asp:Panel ID="Panel1" runat="server">This is a little test</asp:Panel>
        </form>
    </body>
    </html>

    Code behind:

    Public Class _Default
        Inherits System.Web.UI.Page
    
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
        End Sub
    
        Protected Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
            Label1.Text = Date.Now.ToLongTimeString
        End Sub
    End Class

    If I run this in my IDE to debug everything works fine. Label1 updates every second its content and you can see it in the browser window. If you click in TextBox1 a ballon with the content of Panel1 will shown. So far so good. But if I publish this website to the target machine the UpdatePanel does'nt update Label1 but the ballon will shown if you click in Textbox1 (so I think the AjaxControlToolkit works well).
    I've done this tests: I dropped the Ballon-Extender (can't be used without ToolkitScriptManager) and use <asp:ScriptManager> instead <asp:ToolkitScriptManager> and publish that again. In that case the UpdatePanel updates Label1 as desired.
    In my distress i published it to a Win2003 server with a working Framework 4.0. But the problem still remains...

    Meanwhile I've seen that there is a great different how to create the project: If I create the Web as a project (File -> New Project -> Empty ASP.NET-Webapplication) then you will see this effect descripted above. But if I create the Web with File -> New Website -> Empty ASP.NET-Website then it will works also with <asp:ToolkitScriptManager>. But this way is'nt a solution for me because not all elements which you can add to the Website are available (e.g. NestedMasterPages) if you create the Web with File -> New Website.

    Anyone have an idea or have a solution? I'm going crazy with that!!! Yell

    Thanks
    Ralf

    Tuesday, October 29, 2013 10:02 AM

Answers