Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

TabContainer - Messages Not Showing

$
0
0

On all of my pages, I use a ModalWindowExtender to allow users to edit data.  All of this works on all the other pages, and technically works on the TabContainer.

After a user enters their information on the ModalWindow and clicks "Save", the data is pushed to be stored and some "Confirmation Messages" appear.  This all works great except for the page with the TabContainer and I haven't been able to find the cause of this. 

After the data is stored, I post the following lines:
    base.ShowSuccessfulMessage("Transfer Ready for Processing");
    base.DisplayAlertWithNoUpdatePanels("Transfer Ready for Processing");

As said:  this works great in the other pages and the code is called with no errors on the Tabs, except no messages are shown to the users. 

Here are the two methods being called.  I haven't found a cause as to why the TabContainer is impacting this, but for some reason, it is.  If I place the same two calls outside the TabContainer on the same page, they display. 

protected void ShowSuccessfulMessage(string pErrorMessage)
        {
            Label lblMessage = (Label)FindControlRecursive("lblMessage");
            Panel pnlMessage = (Panel)FindControlRecursive("pnlMessage");

            lblMessage.Text = pErrorMessage;
            lblMessage.CssClass = "successMessage";
            pnlMessage.Visible = true;
        }

protected virtual void DisplayAlertWithNoUpdatePanels(string pMessage)
        {
            ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), string.Format("alert('{0}');", pMessage.Replace("'", @"\'")), true);
        }

Thanks
Andy


Viewing all articles
Browse latest Browse all 5678

Trending Articles