hversemann
Member
In the web App. that I'm developing I have several content pages of which only one of them is using an UpdatePanel control. My ScriptManager control is on the master page of the app. but after some reading I'm not sure its in the right place. I've placed it within the FORM tag underneath the BODY tag on my master page and not presently in either of the two content holder controls on the master page, but I have yet to get this to work even once. So here are all the pieces from the master page through the content page:
1.) MasterPage code:
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" SupportsPartialRendering="true" >
2.) Current content page markup code:
<asp:Button ID="UpdatePanelButton" runat="server" Text="Update Panel" Visible="false" OnClick="UpdatePanelButton_Click" />
<asp:UpdatePanel ID="PullRubricPageUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<br />
<asp:Label ID="UpdatePanelLabel" runat="server" Text="" Font-Bold="true" ForeColor="#ff0066"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdatePanelButton" EventName="Click" ></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
3.) In my actual code-behind method DisplayUpdatePanelLabelMessage(string msg, string caller) is called with the following code in it:
if ((msg != null) && (msg != "") && (msg != " "))
{
updtMessage = msg;
UpdatePanelButton_Click(new object(), new EventArgs());
}
4.) And then finally the UpdatePanelButton_Click method is called and its code looks like this:
Label UpdatePanelLabel = (Label)PullRubricPageUpdatePanel.FindControl("UpdatePanelLabel");
UpdatePanelLabel.Text = updtMessage;
So I would normally expect the label to update asynchronously and frequently during a couple of different parts of the logic, but it only seems to update synchronously, so I'm missing something somewhere in the setup of the whole UpdatePanel process. But what?
I have actually put breakpoints in my code in both the DisplayUpdatePanelLabelMessage method and the UpdatePanelButton_Click method and messages are being sent to both of them, yet nothing is happening asynchronously on the page within the UpdatePanel.
So any help in figuring out my problem would be greatly appreciated.
Thanks for the help.
Henry
1.) MasterPage code:
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" SupportsPartialRendering="true" >
2.) Current content page markup code:
<asp:Button ID="UpdatePanelButton" runat="server" Text="Update Panel" Visible="false" OnClick="UpdatePanelButton_Click" />
<asp:UpdatePanel ID="PullRubricPageUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<br />
<asp:Label ID="UpdatePanelLabel" runat="server" Text="" Font-Bold="true" ForeColor="#ff0066"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="UpdatePanelButton" EventName="Click" ></asp:AsyncPostBackTrigger>
</Triggers>
</asp:UpdatePanel>
3.) In my actual code-behind method DisplayUpdatePanelLabelMessage(string msg, string caller) is called with the following code in it:
if ((msg != null) && (msg != "") && (msg != " "))
{
updtMessage = msg;
UpdatePanelButton_Click(new object(), new EventArgs());
}
4.) And then finally the UpdatePanelButton_Click method is called and its code looks like this:
Label UpdatePanelLabel = (Label)PullRubricPageUpdatePanel.FindControl("UpdatePanelLabel");
UpdatePanelLabel.Text = updtMessage;
So I would normally expect the label to update asynchronously and frequently during a couple of different parts of the logic, but it only seems to update synchronously, so I'm missing something somewhere in the setup of the whole UpdatePanel process. But what?
I have actually put breakpoints in my code in both the DisplayUpdatePanelLabelMessage method and the UpdatePanelButton_Click method and messages are being sent to both of them, yet nothing is happening asynchronously on the page within the UpdatePanel.
So any help in figuring out my problem would be greatly appreciated.
Thanks for the help.
Henry