Dale Marshall
Dale Marshall

Reputation: 1135

Modifying the AJAX Control Toolkit Dropdown extender

I am using the example on the AJAX website for the DropDownExtender. 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?

Upvotes: 3

Views: 4356

Answers (1)

David Hall
David Hall

Reputation: 33153

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.

Upvotes: 4

Related Questions