详细信息视图上的访问下拉列表 [英] access drop down list on details view
本文介绍了详细信息视图上的访问下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直试图找到一种方法来访问详细信息视图中项目模板内的下拉列表值.
所以这个下拉列表是针对数据库的,我想恢复页面加载时加载的值. "h2_lin">解决方案
执行以下操作:
DropDownList ddl =(DropDownList)dtv.Rows [index] .FindControl("ddlTemplate");
ddl得到项目模板中下拉菜单的引用,即ddlTemplate.
让我知道它的运行方式.
Ive been trying to find a way to access a drop down list value that is within the item template in a details view. This drop down list is conected to a database and i want to recover the value that is loaded when the page loads.
So can anyone help me with some clues on how to go about this??
解决方案
Do this:
DropDownList ddl = (DropDownList)dtv.Rows[index].FindControl("ddlTemplate");
ddl gets the reference to the dropdown in the item template, i.e ddlTemplate.
Let me know how it goes.
这篇关于详细信息视图上的访问下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文