码迷,mamicode.com
首页 > 其他好文 > 详细

rowcommand事件中获取控件

时间:2016-08-16 16:02:23      阅读:113      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!