• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Ajax Drop Down Extender

Drop Down Extender

DropDownExtender is used to make a control DropDown when user click on another control and immediately after user select a option fromit  the control dropeddown will be automatically hidden.

Properties

Target ControlID:

DropDownControlID:

Used to specify the ID of the control to dropdown when user click on the target control.

Example

The following example demonstrates how to use dropdown Extender control.

Add apage to the website and then place a Toolkit Script manager on ti and then an Image control & just below the Image control take a panel and within the panel take three linkbuttons with the captions get to Name of an Image available in  your website.

Within code of the page create a method with the name linkclicked and with inthat methos write the following code.

 

protected void LinkClicked(object Sender,EventArgs e)

{

string path=”~/image/”+((LinkButton) sender).Text+”.jpg”;

Image1.ImageUrl=path;

}

With in the properties of 3 LinkButtons get the click event to name of the methos we created in the code that is ‘LinkClicked’.

Set ImageUrl Property for the Image control within the pageload event as follows to display the Image in Image Control Immediately page is loaded.

-Page Load –

Image1.ImageUrl=”~/Images/Tulips.jpg”;

Within HTML source of the page drag and DropDownExtender and set following properties to it.

<asp:DropDownExtender ID=”DropDownExtender1” runat=”server” TargetcontrolID=”Image1”DropDownControlID=”Panel1”>

</asp:DropDownExtender>

At runtime when you click on the image then the panel will dropDownjust below the Image control and clicking on LinkButtion will display corresponding Image with in the ImageControl and the panel will be automatically hidden.

*http://www.visualstudiolaunch.com/vs2012vle/Home visualstudio-2012.

Summary
Review Date
Reviewed Item
Ajax Drop Down Extender
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Ajax Drop Down Extender"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.