Ajax toolkit Control Learning Series (9) -- popupcontrolextender

Source: Internet
Author: User
    • 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;
}
 
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.