Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5
AddLinkedRequestTrigger not working with WebAsyncRefreshPanel on UltraWebTab
posted

Can anyone show me how to make it work.  What I want to do is to update the Label2 with the latest time and refresh (async) the WebAsyncRefreshPanel1 at the Button2_Click event.  So, then, Label1 is refreshed with the same timestamp as Label2.  The problem is that after using WebAsyncRefreshPanel1.AddLinkedRequestTrigger("*Button2"); only Label1 is updated, but not Label2.  The behavior is reversed when that statement is removed.  I'm using a Master Page.  And the Content Page is not AJAX-enabled webpage.  Please assist.  Thanks.

Here is the Default.aspx page.

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Infragistics35.WebUI.UltraWebTab.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebTab" TagPrefix="igtab" %>
<%@ Register Assembly="Infragistics35.WebUI.Misc.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%@ Register Assembly="Infragistics35.Web.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.LayoutControls" TagPrefix="ig" %>
   
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<igtab:UltraWebTab ID="UltraWebTab1" runat="server" Width="400px"
        Height="300px" >
    <Tabs>
        <igtab:Tab Text="Tab 1" Key="Tab1" >
            <ContentTemplate>
                <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server"
                    Height="80px" Width="80px"                    
                    >
                    <asp:Label runat="server" ID="Label1" Text="Time: " />
                    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
                </igmisc:WebAsyncRefreshPanel>
            </ContentTemplate>
        </igtab:Tab>
        <igtab:Tab Text="Tab 2" Key="Tab2">
            <ContentTemplate>
                <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel2" runat="server"
                    Height="80px" Width="80px"
                    >
                    <asp:Label runat="server" ID="Label2" Text="Time: " />
                    <asp:Button ID="Button2" runat="server" Text="Button"  onclick="Button2_Click" /> 
                </igmisc:WebAsyncRefreshPanel>
            </ContentTemplate>
        </igtab:Tab>
        <igtab:Tab Text="Tab 3"  Key="Tab3">
            <ContentTemplate>
                <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel3" runat="server" Height="80px" Width="80px"
                    >
                    <asp:Label runat="server" ID="Label3" Text="Time: " />
                    <asp:Button ID="Button3" runat="server" Text="Button"  onclick="Button3_Click" /> 
                </igmisc:WebAsyncRefreshPanel>
            </ContentTemplate>
        </igtab:Tab>
    </Tabs>
    </igtab:UltraWebTab>
</asp:Content>

Here is the Default.aspx.cs page.

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = "Tab 1 is here";
        Label2.Text = "Tab 2 is here";
        Label3.Text = "Tab 3 is here";
        WebAsyncRefreshPanel1.AddLinkedRequestTrigger("*Button2");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(3000);
        Label1.Text = "Page refreshed at " +
            DateTime.Now.ToString();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(3000);
        Label2.Text = "Page refreshed at " +
            DateTime.Now.ToString();
        Label1.Text = Label2.Text;
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(3000);
        Label3.Text = "Page refreshed at " +
            DateTime.Now.ToString();
    }
}