Ajax control Toolkit Balloonpopup Use examples and effects _ practical skills

Source: Internet
Author: User

An introduction to the AJAX Control Toolkit Toolkit and how to get it, see another essay in this series: Ajax control Toolkit usages (1) autocompleteextender.

Introduction to Balloonpopup Controls

The Balloonpopup control can display a pop-up layer, which can contain a lot of content. For example, when a user moves the mouse over a text box, you can use this control to display some help information for the user.

The Balloonpopup control supports three styles (Balloonstyle): Balloon Style (Balloon), rectangular style (Rectangle), and user-defined styles (custom). The size of the pop-up layer also has three models: Small (Small), Medium (Medium), Large (Large). If you set the Balloonstyle attribute to custom, you need to set the Customcssurl property value to the path of the custom style sheet.

How Balloonpopup controls are used

1. Add the Toolkitscriptmanager control to the page to register the script required for the control to the page;

Copy Code code as follows:

<ajaxtoolkit:toolkitscriptmanager id= "ToolkitScriptManager1" runat= "Server" >ajaxtoolkit: Toolkitscriptmanager>

2. Add a Panel control to act as a container to hold the hint content;

Copy Code code as follows:

<asp:panel runat= "Server" id= "Messagepanel" >
Little meatballs, I'll tell you a joke ~ ~
<asp:image runat= "Server" Imageurl= "~/images/smile. gif" imagealign= "Absmiddle"/>asp:panel>

3. Add Balloonpopupextender controls, customize styles, bind target controls, and prompt information containers;

Copy Code code as follows:

<ajaxtoolkit:balloonpopupextender runat= "Server" id= "BalloonPopupExtender1"
position= "TopLeft"
Targetcontrolid= "Image2"
Balloonpopupcontrolid= "Panel1"
Balloonsize= "Small"
Balloonstyle= "Cloud"
displayonmouseover= "True"/>

4. Run the page, you will see the following effects:


For more use, see the Ajax Control Toolkit sample site.

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.