Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have functionality
i.e. on button click event i've to generate report in excel.

but on btn click btn should be disable till report open in excel & then as soon as report open in excel then btn should be enabled.

i use this code but some problem
Posted
Updated 25-Apr-12 2:21am
v3
Comments
Member 8861818 25-Apr-12 8:17am    
using below solution 1
btn disabled but btn click event doesnot call
what is problem... i want to call btn clicke event also...

Try this code

JavaScript
//Javascript
<script type="text/javascript">
        function disable(control)
        {
            control.disabled="disabled";
            //added alert to give the snapshot of what happens
            //when the button is clicked
            alert(100);
        }
 </script>


ASP.NET
<asp:button id="btn" runat="server" onclientclick="disable(this)" xmlns:asp="#unknown">
Text="Click me!" OnClick="btn_Click" /></asp:button>


View this article for any help

http://encosia.com/disable-a-button-control-during-postback/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900