Hello,
I have an Export button in 1 module. On click of it a XLS file is supposed to get downloaded. This is handled by setting appropriate content-type & content-disposition headers and then using Response.WriteFile(). [Also tried Response.BinaryWrite().] This functionality works on alternate clicks. Meaning: when I click on Export for first time, it downloads the file. 2nd time, it just reloads the page, 3rd time it downloads the file, 4th time reload and so on.
This behaviour is seen when the Page State Persistence (in Host Settings > Performance Settings) is set to "Memory". If we change it to "Page" I don't face any problem, Export button behaves as desired.
Is there a way to make Export button work consistantly, even if Page State is saved to Memory.
I'm using DNN 4.9.0. I can possibly fix this problem if I do changes to CachePageStatePersister, but its not allowed by our client. So if there is some way that I can handle it through my module itself, please let me know.
Thanks & Regards,
- Vivek Athalye