views:

2454

answers:

3

I am using the example on the AJAX website for the dropdown extender. I'm looking to make the target control, the label, have the dropdown image appear always instead of just when I hover over it. Is there any way to do this?

+3  A: 

This can be done using the following script tag:


<script>
    function pageLoad()
    {
        $find('TextBox1_DropDownExtender')._dropWrapperHoverBehavior_onhover();
        $find('TextBox1_DropDownExtender').unhover = VisibleMe;
    }  

    function VisibleMe()
    {
        $find('TextBox1_DropDownExtender')._dropWrapperHoverBehavior_onhover();
    }
</script>

I found this and some other tips at this dot net curry example.

It works but I'd also consider writing a new control based on the drop down extender exposing a property to set the behaviour you want on or off.

Writing a new AJAX control isn't too hard, more fiddly than anything.

David Hall
A: 

but i have confusion where we have to put the pageLoad() function and where we have to put the VisibleMe()

assad