首页 > 其他 > 详细

rowcommand事件中获取控件

时间:2016-08-16 16:01:56      阅读:214      评论:0      收藏:0      [点我收藏+]

 //根据当前按钮生成命名空间

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {

                GridViewRow row = (GridViewRow)((e.CommandSource as ImageButton).NamingContainer);
                string menu_name = (row.FindControl("txtEmptyName") as TextBox).Text.Trim();
                string menu_description = (row.FindControl("txtEmptyDesc") as TextBox).Text.Trim();
                string menu_url = (row.FindControl("txtEmptyURL") as TextBox).Text.Trim();
                if (MenuBusiness.AddMenu(menu_name, menu_description, menu_url, login_user.UserId) > 0)
                {
                    this.Alert("successfuly!");
                    BindMenuList();
                }

}

rowcommand事件中获取控件

原文:http://www.cnblogs.com/lxboy2009/p/5776627.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!