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.