views:

84

answers:

1

I am experiencing an interesting issue. We are running a website using masterpage and in one of the pages, I need to create an update panel that will display group SSID on completion.

So, in one of the content placesholders, I put this in:

<asp:ScriptManager ID="scManagerConfirm" runat="server" />
<asp:Timer ID="tmrStatus" OnTick="tmrStatus_Tick" Enabled="false" runat="server" Interval="5000" />
   <asp:UpdatePanel ID="upnlStatus" runat="server" UpdateMode="Conditional">
      <Triggers>
         <asp:AsyncPostBackTrigger ControlID="btnConfirm" />
         <asp:AsyncPostBackTrigger ControlID="tmrStatus" />
      </Triggers>
      <ContentTemplate>
          <asp:Panel ID="pnlStatus" CssClass="appStoreStatus" Visible="false" runat="server">
             <p><asp:Literal ID="litStatusText" runat="server" Text="<%$ Resources:GRes, StatusProcessing %>"></asp:Literal></p>
          </asp:Panel>
      </ContentTemplate>
   </asp:UpdatePanel>

   <asp:Button ID="btnConfirm" OnClick="btnConfirm_OnClick" Text="<%$ Resources:GRes, Confirm %>" CausesValidation="true" UseSubmitBehavior="false" runat="server" />

background code is simple:

protected enum RequestStatus { Unprocessed, Processed }

protected void Page_Load( object sender, EventArgs e ) {
}

protected void btnConfirm_OnClick( object sender, EventArgs e ) {
   pnlStatus.Visible = true;
   tmrStatus.Enabled = true;
}

protected void tmrStatus_Tick( object sender, EventArgs e ) {
   if (GetStatus() == RequestStatus.Processed) {
      litStatusText.Text = "SSID: " + GetSSID();
      tmrStatus.Enabled = false;
   }
}

private String GetSSID() {
   return "S-12345-1235-1235-1235";
}

private RequestStatus GetStatus() {
   return RequestStatus.Processed;
}

Now, the problem I am experiencing is that this doesn't work. It works if I use PostBackTriggers and not Async ones. However, that is not the functionality I would want. I have tried to put button and timer into UpdatePanel to no avail.

Any ideas what could be wrong with this?

A: 

This problem is now solved. All I had to do was add Async="true" to:

<%@ Page Language="C#" MasterPageFile="~/FlipitAdminPortal.Master" AutoEventWireup="true" CodeBehind="AppUpload.aspx.cs" Inherits="FlipitAdminPortal.AppUpload" Async="true" %>
Vladimir Kocjancic