ASP Disable Key

 


        public void RegisterDisableControlWhenKeyDown(Control ctrlNeedDisable, WebControl ctrlOnKeyDown)

        {

            string script = string.Format(@"disableControlWhenKeyDown('{0}');", ctrlNeedDisable.ClientID);

            ctrlOnKeyDown.Attributes.Add("onkeydown", script);

        }

留言

熱門文章