PopupcontrolExtender is used to make a control popup when user click on a control display the selected value in the target control and hide the popupcontrol. Properties TargetcontrolID : PopupcontrolID : Used to specify ID of the control to popup when the user click on the target control offset x & offset Y : Used to specify position of the popup control relative to the target control
The following example demonstrates how to use the popupcontrolExtender. Add a page to the website and place a ToolkitScriptManager followed by an update panel & within the update panel a textbox & panel and for the textbox set the ID as T1. Within the panel control in updatepanel take a radiobuttonlist control, set its ID as ‘RL’ and Add some items to it using the items property. Within HTML source of the page Drag & Drop a popup control/Extender and set following properties for it. <asp:popupcontrolExtender ID=”popupcontrolExtender1” runat=”server” TargetcontrolID=”T1” popupcontrolID=”panel1” offset=”30”> </asp:popupcontrolExtender> For the RadioButtonList set Autopostback property true and write the following code within selectedIndexchanged of that RadioButtonList. RL-selectedIndexchanged { popupcontrolExtender1.commit(RL.selcted value); } At runtime when you click in the Textbox the panel with RadiobuttonList will popup and whatever the Radiobutton you select, value of that radiobutton will be displayed and will be hidden
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.