- The example is still simple. textbox and related controls are used. After you Click Textbox, a panel is displayed with three linkbuttons. I don't think it's good for me. It makes me feel like dropxxxextender. In general, it is a bit similar.
- Not to mention, let's see the effect first.
Textbox prompts the message, and then select what you need. However, this is just a reference. You can enter what you want.
Popupcontrolextender has several attributes.
TargetcontrolidThat triggers this control.
PopupcontrolidThe pop-up ID.
PositionAfter the pop-up, where is the control.
Offsetxy controls its absolute position.
Of course, there are other attributes that can be studied as needed.
< Div >
< ASP: scriptmanager ID = "SM" Runat = "Server" >
</ ASP: scriptmanager >
< ASP: updatepanel ID = "Updatepanel1" Runat = "Server" >
< Contenttemplate >
< ASP: textbox ID = "TB" Runat = "Server" > </ ASP: textbox >
< Ajax: textboxwatermarkextender ID = "Tbwe_tb" Runat = "Server" Targetcontrolid = "TB" Watermarktext = "What you want to do ." > </ Ajax: textboxwatermarkextender >
< ASP: Panel ID = "Panel" Runat = "Server" >
< ASP: linkbutton ID = "Linkbutton1" Runat = "Server" Text = "Cooking" Onclick = "Lb_onclick" > </ ASP: linkbutton >
< ASP: linkbutton ID = "Linkbutton2" Runat = "Server" Text = "Wash your face" Onclick = "Lb_onclick" > </ ASP: linkbutton >
< ASP: linkbutton ID = "Linkbutton3" Runat = "Server" Text = "Sleeping" Onclick = "Lb_onclick" > </ ASP: linkbutton >
</ ASP: Panel >
< Ajax: popupcontrolextender ID = "PCE" Runat = "Server" Targetcontrolid = "TB" Popupcontrolid = "Panel" Position = "Bottom" > </ Ajax: popupcontrolextender >
</ Contenttemplate >
</ ASP: updatepanel >
</ Div >
Select the returned content, one lineCode.
Protected VoidLb_onclick (ObjectSender, eventargs E)
{
This. TB. Text=(Linkbutton) sender). text;
}