单击按钮获取占位符值. [英] getting place holder value in button click.

查看:90
本文介绍了单击按钮获取占位符值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚安朋友,

我在网格视图中有一个占位符,并且向该占位符动态添加了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)转到GridViewRowCommand事件.
2)检查CommandName.
3)使用e.FindControl函数找到PlaceHolder,并将其存储到PlaceHolder对象plTest.
4)使用plTest.FindControl函数找到您的DropDownList

因此,现在您可以找到您的DropDownList.从中获取选择的值.


祝一切顺利.
--Amit
Hi,
Lets find the DropDownList control together by following the steps:

1) Go to RowCommand event of your GridView.
2) Check the CommandName.
3) Find the PlaceHolder using e.FindControl function and store it to a PlaceHolder object plTest.
4) Find your DropDownList using plTest.FindControl function

So now you are able to find your DropDownList. Get the selected value from this.


All the best.
--Amit


这篇关于单击按钮获取占位符值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆