第二个,修改为这样:e.Item.Controls[0].FindControl("DropDownList1");
解决方案 »
- gridview中使用js
- 一个简单功能
- asp.net treeview
- jmail 报错 Connection reset by client.
- linq to sql 问题
- winfrom 安装和部署的问题
- 更新时用SqlParameter如何不让它把html字符格式过滤?
- 【如何清空DropDownList ???】~~~~~~~~~~~~~~~~~~国庆快乐,中秋快乐。
- 兄弟们,能不能在DataGrid中再套一个DataGrid?(共40分全给)
- RadioButton控件
- 请问,php中有一个eval()函数,asp.net中有类似的函数吗?
- 请问要学习asp.net需要有什么基础?
如果你只是想在编辑是使用DropDownList而不是TextBox,那你可以把这一列转换成模板列,并在HTML中修改,把EditTemplate里面的TextBox控件去掉,加入一个DropDownList。
这样在代码里面就可以用
DropDownList list = (DropDownList)e.Item.FindControl("DropDownList1");
来查找这个DropDownList控件。