如何在子数据列表中获取父级的DataKeyField值 [英] How to Get parent's DataKeyField value inside child datalist
本文介绍了如何在子数据列表中获取父级的DataKeyField值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我在项目中使用了两个数据列表. Datalist2嵌套在datalist1中.我的意思是datalist1是父数据列表,而datalist2是子数据列表.
现在我的问题是如何在子数据列表中获取父数据列表的键值?
我在嵌套数据列表中有1个文本框和1个按钮,因此,当我单击按钮时,我需要父数据列表的数据键将数据存储在数据库中.
请回复.
谢谢.
shailesh prajapati
Hello,
I have used two datalist in my project. Datalist2 is nested within datalist1. I mean datalist1 is parent datalist and datalist2 is child datalist.
Now my question is how to get parent''s datalist''s keyvalue inside child datalist?
I have 1 textbox and 1 button inside nested datalist so, when I click on button that time I need parent datalist''s datakey to store data in database.
Please reply.
Thanks.
shailesh prajapati
推荐答案
此 ^ ]是一个类似的问题,已经得到解答.您可能会从中获得帮助.
This How to get parent datalist value from child datalist in .net[^] is a similar question which has already been answered. You may get help from this.
这篇关于如何在子数据列表中获取父级的DataKeyField值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文