如何在datalist的ItemDatabound事件中找到gridview的标签 [英] How to find label of gridview on ItemDatabound event of datalist
本文介绍了如何在datalist的ItemDatabound事件中找到gridview的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的结构如下:
< gridview>
< Label>
< br $> b $ b
我希望在datalist
解决方案
您好,
您可以使用以下代码在ItemDataBound事件中从DataList查找标签。
标签YourLabel =(标签)e.Item.FindControl(YourLabel);
YourLabel.Text =你的价值
问候,
Manoj
试试此链接
http://stackoverflow.com/questions/7913668/access-to-datalist-event-inside-another-databound-control-finding-controls-ins [ ^ 一>
I have i structure like :
<gridview>
<Label>
and i want label value of gridview in ItemDatabound event of datalist
解决方案
Hi,
You can use the following code to find label from DataList in ItemDataBound event.
Label YourLabel= (Label)e.Item.FindControl("YourLabel"); YourLabel.Text = "Your value"
Regards,
Manoj
Try This Link
http://stackoverflow.com/questions/7913668/access-to-datalist-event-inside-another-databound-control-finding-controls-ins[^]
这篇关于如何在datalist的ItemDatabound事件中找到gridview的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文