Sunday, March 7, 2010

WebPart button event fires only once

In order to make sure a button in a WebPart (for example to export data to excel) can be clicked more than once add the following to the OnClientClick event:

buttonExportToExcel.OnClientClick = "_spFormOnSubmitCalled = false;_spSuppressFormOnSubmitWrapper=true;";

No comments: