开发者

ASP.NET Nested Data Bound Controls

Say I have a Form View with a Repeater inside of it, and then a Data List nested inside of the Repeater. If I had an Update Command in the DataSource for the Form Vi开发者_StackOverflow社区ew would I be able to associate bound values within the Data List to parameters in the Form Views' DS?


You can always go up using .NamingContainer up to the container that has the data you want, and access through .DataItem.

Something around the lines:

((ContainerType)Container.NamingContainer.NamingContainer).DataItem ...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜