本文介绍了如何在网格视图的页脚中找到DropDownList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在页脚中有DropDownList,我想找到我的下拉列表来绑定它我得到错误对象引用未设置为对象的实例。我尝试在RowDataBound事件中绑定它
这是我的代码
DropDownList drp_pmm = gv_pm.FooterRow.FindControl(drp_pmm)as DropDownList;
i have DropDownList in footer whene i want to find my drop down list to bind it i get error Object reference not set to an instance of an object. i try to bind it in RowDataBound event
this is my code
DropDownList drp_pmm = gv_pm.FooterRow.FindControl("drp_pmm") as DropDownList;
<FooterTemplate>
<asp:DropDownList ID="drp_pmm" runat="server"></asp:DropDownList>
</FooterTemplate>
推荐答案
这篇关于如何在网格视图的页脚中找到DropDownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!