0

I use DotNetZip Library To Create Zip and Download File as a Zip File then, I want To Redirect or Refresh Same Page in Code behind, How Can O Do that(In Same PostBack)

ex:

zip.Save(Response.OutputStream);
Response.Redirect(url,false);

I want to Refresh Page After Downloading file,but It doesnt refresh if I use Response.Redirect.

jomsk1e
  • 3,585
  • 7
  • 34
  • 59

2 Answers2

0

Found Solution .I did that with using javascript,i had set time out in link button onclientclick event. OnClick="LinkButton1_Click" OnScript OnClientClick="JavaScript:AutoRefresh(5000);"

In Onclick event did call code behind function and call time off function in onclientclick event

function AutoRefresh(t) {

        // setTimeout("location.reload(true);", t);
        setTimeout(function () { window.location = window.location; }, t);
    }
0

Use window.location.href = window.location.href;

dead_webdev
  • 164
  • 2
  • 9