Ive tried using the following code below, but it doesnt work. Redirect to another page after download codeproject. After the download is completed, i want to redirect the user to some other page, but. To copy the download to your computer for installation at a later time, click save or save this program to disk. Restsharp is one of the several ways to create a web service or web request in. But now i need to redirect user to another page right after authorization, at the same time when downloading file. How to easily remap keys in windows 10 using sharpkeys. Please does anyone know a better way to accomplish both.
It only redirects to another page without downloading the file. Ill cover the following topics in the code samples below. Redirect is executed and then after that page is redirected to the given page. Redirecting a page after a pdf download stack overflow. Im developing a webpage that will commence a download file process when visited. Redirect to home page after file downloading hello every one, i have a small problem. Download the zip file from the attachment for the full source code of. How to redirect to another page after download codeproject.
I simply couldnt get it to work after a lot of faffing about i discovered that this can be done with webclient too and that proved more reliable for me to get that to work with webclient you seem to have to create a class that derives from webclient so that you can manually. Redirecturl, false and check that you are not using response. It contains a string of allowed file types so users cannot change the. If you want the keys on your keyboard to something else than the usual, then read up on how to remap them in windows 10 using the free sharpkeys. The following example forces an unconditional redirection to another web site. Looking in fiddler i could see i wasnt actually getting the final redirect. The web server generates the download in response to the data in the submitted form and gives that as a response. In todays post, though, well take a look at restsharp specifically, its features and benefits, and a few examples of restsharp in action.
1383 1385 296 885 1638 261 268 1420 159 1105 244 660 1122 463 97 1630 1479 279 608 70 1474 1172 1241 1013 1270 949 871 478 1154 358 160 1035 634 68 111 467 1002 1459 1285 145