【问题标题】:How to find the repeater item where the event was triggered?如何找到触发事件的中继器项目?
【发布时间】:2011-11-30 03:26:06
【问题描述】:

我的中继器结构是这样的

---------------------------------
| Repeater                      |
---------------------------------
| Dropdownlist    |   Label     |
---------------------------------

每个转发器项目都有一个下拉列表和一个标签。根据下拉列表中选择的值,我想在后面的代码中调用一个方法来计算一个值并将其设置在标签中。
但是我遇到了传统的 SelectedIndexChanged 事件的问题。它不会告诉我父项或中继器项。

【问题讨论】:

    标签: asp.net events drop-down-menu repeater


    【解决方案1】:

    将 selectedindexchaged 事件的发送者转换为控件。

    找到它的父...直到你得到一个重复项的对象...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多