蓝色信仰

博客园 首页 新随笔 联系 订阅 管理

DropDownList list = this.findContol("aas") as DropDownList;
list.DataSource = new DataTable()

-------------------------------

Control ctl = this.FindControl("NAME");
            if (ctl != null)
            {
                if (ctl is DropDownList)
                {
                    DropDownList lst = ctl as DropDownList;
                    try
                    {
                        lst.SelectedIndex = 0;
                    }
                    catch (Exception ex)
                    {
                        SplendidError.SystemWarning(new StackTrace(true).GetFrame(0), ex);
                    }
                }
            }

posted on 2014-05-31 15:02  蓝色信仰  阅读(212)  评论(0编辑  收藏  举报