After you download a file from custom web part in a SharePoint 2007 site, normally all the buttons and link buttons are disabled and click events are not working. So here is a simple fix for that. Copy and paste the fallowing script in the bottom of your web part.
<script type="text/javascript">
_spOriginalFormAction = document.forms[0].action;
_spSuppressFormOnSubmitWrapper = true;
</script>
<script type="text/javascript">
_spOriginalFormAction = document.forms[0].action;
_spSuppressFormOnSubmitWrapper = true;
</script>