I have created a Progress bar by calling my long server side process in a new thread and call a popup progress.aspx page to shows the progress..
progress value is stored in static class file called CProgressArg
code in the progress.aspx file is like this
int state = CProgressArg.percn;
protected void Page_Load(object sender, EventArgs e)
{
if (state > 0 && state <= 100)
{
this.panelProgress.Width = (400 * state) / 100;
this.lblPercent.Text = state + "%";
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "", "<script>window.setTimeout('window.form1.submit()',1000);</script>");
else
{
this.lblMessages.Text = "Error Ocoured!";
Page.RegisterStartupScript("", "<script>window.close();</script>");
return;
}
}
I called new thread like this in the button click in main page.
new Thread(delegate()
{
ProcessModule(dtemp, ref errmsg);
}).Start();
below code will open the progress.aspx page.
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "OpenProgess('../Payroll/Progress.aspx', 0,420,150);", true);
After executing full function in new thread I need to show another popup that "Want to procees next activity " . this msg has to be in main aspx page from where i create thread....
How can i get back to main page from progress.aspx if all process finishe.???
Or can i Popup window as ajax modal popup instead of another aspx page (like progress.aspx)..
If we can then How to show the progress in modal popup window ??