Will Response.Redirect() stop a thread?

M

Mark Huebner

I have an aspx web page with the following C# code in the page load event.
Can somebody tell me if the Response.Redirect() will cause my tLoadDNN
thread to stop executing before it is finished? tLoadDNN might occasionally
take up to 16 seconds to complete.

protected void Page_Load(object sender, EventArgs e)
{
Thread tLoadDNN = new Thread(new ThreadStart(LoadDNN));
tLoadDNN.Start();
Response.Redirect("Default1.htm");
}
 
M

Mark Huebner

If the second parameter is "false", does that mean the Response.Redirect
won't redirect to the new URL until the thread finishes executing? I would
like it to redirect immediately to the new URL while the thread continues to
execute.
 
M

Mark Rae

If the second parameter is "false", does that mean the Response.Redirect
won't redirect to the new URL until the thread finishes executing?
Yes.

I would like it to redirect immediately to the new URL

Response.Redirect("somepage.aspx", false);
return;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top