This project has moved. For the latest updates, please go here.

redirect to a new page after the handler finished the file upload

May 26, 2009 at 8:54 PM
Edited May 26, 2009 at 8:55 PM

I would like to redirect to a new page after the handler finished the file upload(s). Where in the code can I accomplish this? Here is my code, now where in the handler do I have to put it to make it work?

string URL = String.Format("~/User/ViewMyThread.aspx?threadID={0}", parameters);

context.Response.Redirect(URL, false);

context.Current.ApplicationInstance.CompleteRequest();

Your help is greatly appreciated. Thanks!

Coordinator
May 26, 2009 at 9:15 PM

You'll need to do this with JavaScript. There's an AllFilesFinished event available which is fired in javascript.

See the javascript examples included in the project.

//Register All Files Finished Uploading event
slCtl.Content.Files.AllFilesFinished = AllFilesFinished;

function AllFilesFinished() {
            //Do a JavaScript redirect here

        }