2011-12-05 22 views
1

是否可以通過單擊頁面上的其他內容來顯示Ajax DropDownExtender? Button,ImageButton,Anchor,Image,HyperLink等等。用另一個控件顯示Ajax DropDownExtender

---更好的解釋---

我有一個帶下拉伸長的文本框。工作正常。我想要做的是通過單擊另一個控件來顯示該dropdroptender。

回答

0

這不是DropdownExtender打算如何工作。

但是,有一個(有點不完美)的解決方法。不管你控制什麼想點擊(按鈕,ImageButton的,錨,圖片,超鏈接等),爲其分配一個 「點擊」 事件,這是否:

的Javascript

function displayDropDownExtender() { 
    // Get the TextBox control that your extender is currently linked to 
    var junk = document.getElementById('<%= TextBox1.ClientID %>'); 
    // Call the DropDownBehavior.hover() method to display the hover effect 
    junk.DropDownBehavior.hover(); 
    // Call the DropDownBehavior._showPopup() method to display the DropDown panel 
    junk.DropDownBehavior._showPopup(); 
} 
+0

@Scott我剛剛看到你的更新(哇,這是一段時間),並意識到我的原始答案不會解決你的問題。我希望這個幫助=) – jadarnel27

相關問題