日期:2014-05-17  浏览次数:20959 次

帮我看看这段代码是什么意思?
//显示网站角色  
protected   void   Button2_Click(object   sender,   EventArgs   e)
        {
                this.ListBox1.SelectedIndex   =   -1;
                this.ListBox1.DataSource   =   Roles.GetAllRoles();
                this.ListBox1.DataBind();
        }
//添加角色
        protected   void   Button1_Click(object   sender,   EventArgs   e)
        {
                String   MyRole   =   this.TextBox1.Text;
                try
                {
                        Roles.CreateRole(MyRole);
                        this.Label3.Text   =   "提示信息: ";
                }
                catch(Exception   ex)
                {
                        this.Label3.Text   =   "提示信息: "   +   ex.Message;
                }
                this.Button2_Click(null,   null);//这一行代码是什么意思?
        }
//删除角色
        protected   void   Button3_Click(object   sender,   EventArgs   e)
        {
                try
                {
                        if   (this.ListBox1.SelectedIndex   !=   -1)
                        {
                                Roles.DeleteRole(this.ListBox1.SelectedValue);
                                this.Label3.Text   =   "提示信息: ";
                        }
                }
                catch   (Exception   ex)
                {
                        this.Label3.Text   =   "提示信息:   "   +   ex.Message;
                }
                this.Button2_Click(null,   null);//这一行代码是什么意思?
        }

------解决方案--------------------
你这个是.net的吧,怎么放到这里来?
好像把这个事件取消掉