2008-11-24 100 views
0

如何在下拉列表中更改itemIndex時導致該事件冒泡 - 以便我可以在我的ItemCreatedCommand函數中使用itemindex-value?在DataList.ItemCreatedCommand(EventBubbling或其他解決方案)中訪問DropDownList.SelectedIndex

溶液在發現:

http://209.85.129.132/search?q=cache:cYDzeE8Swf0J:authors.aspalliance.com/hmcheung/Articles/030331/Default.aspx+dropdownlist+datalist+selectedindex&hl=no&ct=clnk&cd=11&gl=no&client=firefox-a

  • 但是,這是在VB.net,我不 「說話」 VB.net不夠好複製此爲C#。

回答

1

根據我的發現不可能 - 必須冒泡到ItemCommand,而不是ItemCreated命令。因此,讓你處理事件,並獲取發件人.parent,這是datalistitem。

相關問題