Summary: Prevent multiple post when doubleclick on asp:button. <script language="javascript" type="text/javascript">
function disableButton(sender,group)
{
Page_ClientValidate(group);
if (Page_IsValid)
{
sender.disabled = "disabled";
__doPostBack(sender.name, '');
}
}
</script>
<asp:Button runat="server" ID="btnSendMessage" Text="Send melding" OnClick="btnSendMessage_OnClick" OnClientClick="disableButton(this,'Message')" CausesValidation="true" ValidationGroup="Message" />
|