redirect after file upload finishes

May 21, 2009 at 12:45 AM

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);

  HttpContext.Current.ApplicationInstance.CompleteRequest();

Your help is greatly appreciated. Thanks!

Coordinator
May 21, 2009 at 4:36 PM

You will need to do the redirect on the client side, not the server side.  The silverlight control can try to call a javascript method after all files have been uploaded.  The paramter to set for the javascript method is "JavascriptCompleteFunction".  The code download has an example of this.  Or you could add it to the silverlight code.

Hope this helps,

Darick

May 26, 2009 at 7:30 PM
Edited May 26, 2009 at 8:56 PM

.