用户控件上有个按钮  在调用用户控件的页面点击按钮不执行用户控件按钮事件  这怎么回事  如有描述不清楚 叫我在描述下

解决方案 »

  1.   

    先佩服下结贴率。贴代码出来看看才知道什么原因。不择行?是否按钮是disable=true?
      

  2.   

     void showUserInfo()
        {        if (Session["userInfo"] != null)
            {
                jz.Model.userForm moduf = (jz.Model.userForm)Session["userInfo"];
                this.lblUserName.Visible = true;
                this.lblUserName.Text = moduf.userName;
                this.lblRegistr.Visible = false;
                this.lblLogin.Visible = false;
                this.btnQuti.Visible = true;
                this.lblWelcome.Visible = true;
            }
            else
            {            this.lblRegistr.Visible = true;
                this.lblLogin.Visible = true;
                this.lblUserName.Visible = false;
                this.btnQuti.Visible = false;
                this.lblWelcome.Visible = false;
            }
        }
        protected void btnQuti_Click(object sender, EventArgs e)//用户控件上的按钮事件
        {
            Session["userInfo"] = null;
            showUserInfo();
        }