This article describes a popup control for asp.net. This control mimics the warning from MSN Messenger, but is used for Web pages. You can completely change the graphical appearance of the control by selecting a different predefined style or modifying all the colors used on the space. The control supports drag-and-drop, so the user can put it anywhere on the page as he pleases.
An important feature of this control is that it can be used in most browsers today. The browsers that have been tested include the latest version of Mozilla,internet Explorer and opera. On browsers that do not support filter, the control will look different (only the latest version of MSIE supports filter). You can also use HTML on many control properties, so you can get the popup control by icon or any other way.
Figure 1
Action
The control has two events, linkclicked (the connection in Popup is clicked), and popupclosed (the user clicks on the ' X ' button in the popup). There are three different ways to control this event. What method is used is determined by the ActionType property. The three possible actions are as follows:
MessageWindow (Default) – If you select this action, the control pops up a new browser window that displays the text specified by the Text property.
openlink– in this case, the control allows you to do any javasript operation or to open a link to another page (link property). You can also change the target attribute of the generated label. The generated code looks like this: link ..., be careful when using references in link. (The target attribute is added only if LinkTarget is not an empty string.) )
raiseevents– when this item is selected, the popup control causes linkclicked and popupclosed events on the server side.
Figure 2
Use this control
Adding controls to a Web page is simple. In Vs.net, you can use Add/remove Toolbox items and then select the control's DLL file. The control will appear in the toolbox and you can add it to the page.