+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Exception with UpdateProgress and UpdatePanel

Exception with UpdateProgress and UpdatePanel

7 posts, 0 answered
  1. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    09 Nov 2010
    Link to this post

    I have this strange exception when I am using an UpdatePanel and an UpdateProgress panel in a Sitefinity project. I have an UpdatePanel which gets data asynchronously and I have an UpdateProgress panel inside the UpdatePanel (content template) where I would like to show the status of the asynchronous call. This does not seem to work as I am not able to display the status of the Ajax call in the Update Panel at all. And when I try to provide an AssoicatePanelID property for the UpdatePanel it is throwing an exception (I am also attaching the exception in this posting): “Muiltiple controls with the same ID ‘link’ were found. FindControl requires that controls have unique IDs”. I have tried to look up more information about this exception and I have made sure that no other element has the same id, but I still seem not able to understand why I get this exception. I am using the native ASP.NET Ajax Controls- UpdatePanel and UpdateProgress.

    We are using Sitefinity 3.7 version and was wondering if this was any bug with the Sitefinity version using the ASP.NET controls? Could anyone please provide me some suggestions on how to make this work with Sitefinity? Any advice from the Sitefinity professionals would be appreciated.

    Thank you for your time.

    Regards,

    san

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Nov 2010
    Link to this post
    Hi san,

    Could you show us a sample code that we can use to replicate the issue. Does the same code fails if you put it on a standard aspx page. I suspect that there could be some issue with the UpdateProgress with combination with some timer. You can try using our AJAX manager and update panel as well - Ajax / Ajaxify Timer , UpdatePanel

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    10 Nov 2010
    Link to this post
    Hello Ivan,

    Thank you for your reply. I am just using a standard ASP.NET UpdatePanel and a UpdateProgress control on a master page template. And I have been trying to associate the UpdateProgree control to the UpdatePanel with the AssoicatePanelID property. I am also attaching a part of the code as a jpeg image. I am really it might be that I am doing something trivial, but this method really works fine with traditional ASP.NET pages. And do we have an equivalent of UpdateProgress control in RadControls for ASP.NET Ajax?
    Thank you for your time.
    Regards,
    san
  4. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    11 Nov 2010
    Link to this post
    Hi,

    Can anyone please provide me some suggestions for this issue.

    Thank you,
    san
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    14 Nov 2010
    Link to this post
    Hello san,

    I am not able to replicate the issue you have in the context of a user control added to a cms page. Below is a sample control that uses UpdatePanel and UpdateProgress . The update is cased with Timer control or with click of the Button.

    control template

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="UpdateProgressControl.ascx.cs" Inherits="Controls_UpdateProgressControl" %>
     
     
     <style type="text/css">
        #UpdatePanel1 {
          width:300px; height:100px;
         }
        </style>
     
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <fieldset>
            <legend>UpdatePanel</legend>
            <div style="color:Red">
               Updates from Ticker
                <asp:Label  runat="server" ID="TimerLabel" />
            </div>
            <asp:Label ID="Label1" runat="server" Text="Initial page rendered."></asp:Label><br />
            <asp:Button ID="Button1" runat="server" Text="Button" />
            <asp:Timer runat="server" ID="Timer1"></asp:Timer>
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" >
        <ProgressTemplate>
            Processing...
        </ProgressTemplate>
    </asp:UpdateProgress>


    code behind

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
     
    public partial class Controls_UpdateProgressControl : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Button1.Click += new EventHandler(Button1_Click);
           
            Timer1.Interval = 5555;
            Timer1.Enabled = true;
            Timer1.Tick += new EventHandler<EventArgs>(timer_Tick);
        }
     
        void timer_Tick(object sender, EventArgs e)
        {
            TimerLabel.Text = DateTime.UtcNow.ToString();
        }
     
        void Button1_Click(object sender, EventArgs e)
        {
            // use click optionally
            System.Threading.Thread.Sleep(4000);
            Label1.Text = "Page refreshed at " +
                DateTime.Now.ToString();  
        }
    }



    As analogs of the standard ASP.NET controls you can use AJAX Panel and AJAX Loading Panel

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. san
    san avatar
    61 posts
    Registered:
    20 Aug 2010
    15 Nov 2010
    Link to this post
    Hi Ivan,
    Thank you for providing me with the code. But, I am getting the exception when I associate the UpdateProgess control with the UpdatePanel control using the AssociatedUpdatePanelID property. As we can have multiple updatepanels on a page I have associated a updatepanel with a updateprogress control using the AssociatedUpdatePanelID. When I do this I am getting the exception. If I don't provide the AssociatedUpdatePanelID property the code works fine. Please let me know. Thank you for all your time and advice.

    Thank you,
    San
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Nov 2010
    Link to this post
    Hi san,

    Using AssociatedUpdatePanelID property does not cause the issue for me. Could you try using the AJAX Panel and AJAX Loading Panel

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
7 posts, 0 answered