单击按钮获取占位符值. [英] getting place holder value in button click.
本文介绍了单击按钮获取占位符值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
晚安朋友,
我在网格视图中有一个占位符,并且向该占位符动态添加了dropdownlist,我需要在按钮单击中选择该dropdownlist的选定值.
注意:请记住网格视图中的占位符.
感谢U
good evening friends,
i have a place holder in my grid view, and i added dropdownlist to that place holder dynamically, i need to the selected value of that dropdownlist in button click.
note:Remember That place holder in grid view.
Thank U
推荐答案
通过执行以下步骤,一起找到DropDownList
控件:
1)转到GridView
的RowCommand
事件.
2)检查CommandName
.
3)使用e.FindControl
函数找到PlaceHolder
,并将其存储到PlaceHolder
对象plTest
.
4)使用plTest.FindControl
函数找到您的DropDownList
因此,现在您可以找到您的DropDownList
.从中获取选择的值.
祝一切顺利.
--Amit
Hi,
Lets find theDropDownList
control together by following the steps:
1) Go toRowCommand
event of yourGridView
.
2) Check theCommandName
.
3) Find thePlaceHolder
usinge.FindControl
function and store it to aPlaceHolder
objectplTest
.
4) Find yourDropDownList
usingplTest.FindControl
function
So now you are able to find yourDropDownList
. Get the selected value from this.
All the best.
--Amit
这篇关于单击按钮获取占位符值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文