DropDown Demonstration
Hover over the text below and click to select an option:
Select your favorite exotic ice-cream flavor
DropDown is an ASP.NET AJAX extender that can be attached to almost any ASP.NET control to provide
a SharePoint-style drop-down menu. The displayed menu is merely another panel or control. In the
above sample the drop-down is a Panel which contains LinkButtons. The drop-down is activated by left-
or right-clicking the attached control. If the behavior is attached to a Hyperlink or LinkButton,
clicking on the link itself will operate normally.
The control above is initialized with this code. The italic properties
are optional:
<ajaxToolkit:DropDownExtender runat="server" ID="DDE"
TargetControlID="TextLabel"
DropDownControlID="DropPanel" />
- TargetControlID - The ID of the control which needs a drop-down.
- DropDownControlID - The ID of the control which will be displayed as the dropdown.
- Animations - Generic animations for the DropDown extender. See the
Using Animations walkthrough and
Animation Reference for more details.
- OnShow - The OnShow animation will be played each time the dropdown
is displayed. The dropdown will be positioned correctly but hidden. The animation can use
<HideAction Visible="true" />
to display the dropdown along with any other visual effects.
- OnHide - The OnHide animation will be played each time the dropdown
is hidden.
|
How Do I: Use the ASP.NET AJAX DropDown Control?
With the DropDown control extender from the ASP.NET AJAX Control Toolkit, you can present the user with
a drop-down list of options that trigger a partial-page update elsewhere on the Web page. The option
selected by the user is passed to the server, allowing your server-side code to process the selection
before completing the partial-page update.
Watch the Video
|