I have finally managed to implement JQuery Ajax upload on my ASP.NET web pages site but now I would like to know how to redirect to a page with the id of what was uploaded, if I put the redirect in my upload handler it doesn't work. Does anyone have any
idea how to use Response.Redirect(); after an Ajax upload?
I would prefer not to use JavaScript to perform my redirect.
The only reason I want it is to show the upload progress but I now think my only option fro redirect is through JavaScript upon receiving complete as
dhavalu said. I decided to get the last db insert by having it as the AJAX response and then using that response in
Member
445 Points
176 Posts
Redirect after Ajax upload
Jul 30, 2013 04:02 AM|mhcodner|LINK
I have finally managed to implement JQuery Ajax upload on my ASP.NET web pages site but now I would like to know how to redirect to a page with the id of what was uploaded, if I put the redirect in my upload handler it doesn't work. Does anyone have any idea how to use Response.Redirect(); after an Ajax upload?
I would prefer not to use JavaScript to perform my redirect.
Participant
1411 Points
394 Posts
Re: Redirect after Ajax upload
Jul 30, 2013 04:07 AM|dhavalu|LINK
Register for UploadedComplete (ajax success on clientside) event and Redirect from their.
Regards
Dhaval Upadhyaya
http://dhavalupadhyaya.wordpress.com/
Member
445 Points
176 Posts
Re: Redirect after Ajax upload
Jul 30, 2013 04:14 AM|mhcodner|LINK
Um what? ASP.NET web pages has no codebehind
Member
445 Points
176 Posts
Re: Redirect after Ajax upload
Jul 30, 2013 04:55 AM|mhcodner|LINK
I would prefer not to use JavaScript to perform my redirect because my redirect uses the id of last db insert
All-Star
194009 Points
28028 Posts
Moderator
Re: Redirect after Ajax upload
Jul 30, 2013 06:31 AM|Mikesdotnetting|LINK
If you want to redirect the user to another page after the post, there seems little point in using AJAX to do the upload.
Member
445 Points
176 Posts
Re: Redirect after Ajax upload
Jul 30, 2013 06:42 AM|mhcodner|LINK
The only reason I want it is to show the upload progress but I now think my only option fro redirect is through JavaScript upon receiving complete as dhavalu said. I decided to get the last db insert by having it as the AJAX response and then using that response in
Which seems to work fine