客户端:
<asp:Button ID="btnSubmit" runat="server" Text="提 交" class="btn2" OnClick="btnSubmit_Click"
OnClientClick="this.disabled=true;" UseSubmitBehavior="false"/> 
在服务器端:
        if(something error before insert  to database){
            Response.Write("error");
            this.btnSubmit.Enabled = true;//解除锁定
        }
        else{
            SubmitToDB();
        }
关键点:UseSubmitBehavior
posted on 2010-04-16 18:53  佐伊凡  阅读(310)  评论(0编辑  收藏  举报