SharePoint button only fires once - not firing the second time after reportviewer export


Just a quick one - I have a button click that generates a report pdf in the code behind. The problem is that it only fires once. This issue only happens in SharePoint.

Turns out that you need to set the variable _spFormOnSubmitCalled = false so that you can trigger the postback again (call this on OnClientClick attribute of the button)