Disable postback at click on a button
I want do disable postback after clicking a <asp:Button> . I've tried to do that by assigning onclick="return false" , but in the button doesn't work. How can I fix this? onClientClick="return false" That should do it! Onclick will refer to an ASP.net function, onClientClick will render as OnClick on the control in HTML. onclick is used to wire up your server side events. You need to use the OnClientClick handler such as <asp:button OnClientClick="return false;" /> Seeing as none of these answers helped me. I found a solution. Instead of using the ASP.NET button <asp:Button> , you should use