在模版列中有一个dropdownlist在ItemDataBound事件中怎么帮定dropdownlist数据
为什么老是抱错"未将对象引用设置到实例",我已经转型了呀
((DropDownList)e.item.cell[0].controls[0]).DataSource=table;
((DropDownList)e.item.FindConrol("mydd")).DataSource=table;
都不行
为什么老是抱错"未将对象引用设置到实例",我已经转型了呀
((DropDownList)e.item.cell[0].controls[0]).DataSource=table;
((DropDownList)e.item.FindConrol("mydd")).DataSource=table;
都不行
解决方案 »
- 关于点“.”在html和aspx下的区别的问题。
- 如果要在网站上获取客户的ip并保存在数据库中在asp.net中怎么实现的?
- 求助C#+ASP.Net调用Javascript存在的问题!!!
- 怎样触发datalist的DeleteCommand属性?
- 关于datagrid的问题
- 有关于include
- .net编写的windows服务可不可以自带安装和卸载功能,而不使用installutil安装和卸载.
- 关于access数据库在ado.net中打不开的问题
- vs2013发布的项目,修改applicationhost.config修改的疑问。
- audio标签里的MP3在网页运行没有用
- utf-8编码的字符串自动链接到搜索引擎的问题?
- 在Visual studio 2005 中加入一个控件
{
DropDownList ddl = (DropDownList)e.Row.FindControl("DropDownList1");
对ddl操作
}我是指在GridView等列表控件里
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DropDownList dl = (DropDownList)e.Row.FindControl("dlstSID");
BindDlst(dl);
}
}
这是我的代码中这样写的。没有任何问题。