I have a simple test project.
One panel executes a timer every 4 seconds (a long running task).
Another panel has a button that will redirect to another page.
Each panel is added to the radajaxmanager ajaxsettings
When the timer is executing, the button on the second panel never executes (although the loading panel is shown). So the new page isn't shown.
This is the code I use:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadAjaxManager1.RequestQueueSize = 3;
// Panel 1
Panel panel =
new
Panel();
panel.Height = 200;
panel.Width = 200;
panel.BorderColor = System.Drawing.Color.Green;
panel.BorderWidth = 3;
panel.BorderStyle = BorderStyle.Solid;
panel.ID =
"NewPanel"
;
Label newLabel =
new
Label();
newLabel.ID =
"NewLabel"
;
panel.Controls.Add(newLabel);
Timer newTimer =
new
Timer();
newTimer.ID =
"newTimer"
;
newTimer.Interval = 4000;
newTimer.Enabled =
true
;
newTimer.Tick += newTimer_Tick;
panel.Controls.Add(newTimer);
RadButton newButton =
new
RadButton();
newButton.ID =
"newButton"
;
newButton.Click += newButton_Click;
panel.Controls.Add(newButton);
form1.Controls.Add(panel);
// Panel 2
Panel panel2 =
new
Panel();
panel2.Height = 200;
panel2.Width = 200;
panel2.BorderColor = System.Drawing.Color.Beige;
panel2.BorderWidth = 3;
panel2.BorderStyle = BorderStyle.Solid;
panel2.ID =
"NewPanel2"
;
Label newLabel2 =
new
Label();
newLabel2.ID =
"NewLabel2"
;
panel2.Controls.Add(newLabel2);
RadButton newButton2 =
new
RadButton();
newButton2.ID =
"newButton2"
;
newButton2.Click += newButton2_Click;
panel2.Controls.Add(newButton2);
form1.Controls.Add(panel2);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(panel, panel);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(panel2, panel2);
}
void
newButton2_Click(
object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(500);
this
.Page.Response.Redirect(
"~/Test.aspx"
);
}
void
newButton_Click(
object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(500);
Label lbl = Page.FindControl(
"NewLabel"
)
as
Label;
lbl.Text = System.DateTime.Now.ToString();
}
void
newTimer_Tick(
object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000);
Label lbl = Page.FindControl(
"NewLabel"
)
as
Label;
lbl.Text = System.DateTime.Now.ToString();
}
}