Update page after file download

后端 未结 4 778
野的像风
野的像风 2020-12-09 12:10

I put together a download script after some wonderful help from stack overflow the other day. However I have now found that after the file has been downloaded I need to relo

4条回答
  •  粉色の甜心
    2020-12-09 12:44

    This is quick and easy to hack if needed.

    Step 1: Add hidden button to .aspx page:

    Step 2: Perform your default postback action and at the end register a startup script with jquery call which will trigger the hidden button click and cause a file to download:

    ClientScriptManager cs = Page.ClientScript;
    cs.RegisterStartupScript(this.GetType(), "modalstuff", "$('.btnExportUploaded').click();", true);
    

提交回复
热议问题