如何让button按钮不可见或者点击事件失效
尝试了button.enable=false 但是点击还是会有反映

解决方案 »

  1.   

    不可见可以用Visible = false;要让它可见,但不响应用户点击,使用Enabled = false;
      

  2.   

    style="display:none"我的网站svn源代码托管服务&bug跟踪管理平台
      

  3.   

    把它的OnClientClick设为return false
      

  4.   

    不可见可以用Visible = false; 
    或者设置其宽度width=0
      

  5.   

    把visable设置为false好了,原来重新编译了也不行,必须关闭浏览器重新编译才看得见效果
      

  6.   

    将它的visible设为false;
    或者你放个其它的东西,而且按钮也有很多种,很多属性。
      

  7.   

    怎么会不行呢aspx:
        <form id="form1" runat="server">
        <div>
        
            <asp:Button ID="Button1" runat="server" Text="Button" />
        
        </div>
        </form>
    cs:        protected void Page_Load(object sender, EventArgs e)
            {
                Button1.Enabled = false;
            }肯定是灰的啊