首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

帮小弟我看看这段代码是什么意思

2012-02-27 
帮我看看这段代码是什么意思?//显示网站角色protectedvoidButton2_Click(objectsender,EventArgse){this.L

帮我看看这段代码是什么意思?
//显示网站角色  
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的吧,怎么放到这里来?
好像把这个事件取消掉

热点排行