温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:asp.net漂亮弹出对话框控件源码及示例
当前文件:
U3PILEHVJGM55/dynamictest.aspx.cs,打开代码结构图
U3PILEHVJGM55/dynamictest.aspx.cs,打开代码结构图1using System; 2
using System.Collections; 3
using System.ComponentModel; 4
using System.Data; 5
using System.Drawing; 6
using System.Web; 7
using System.Web.SessionState; 8
using System.Web.UI; 9
using System.Web.UI.WebControls; 10
using System.Web.UI.HtmlControls; 11
12
using EeekSoft.Web; 13
14
namespace EeekSoft.PopupTest 15
{ 16
/// <summary> 17
/// Test of dynamic control loading 18
/// </summary> 19
public class DynamicTest : System.Web.UI.Page 20
{ 21
protected System.Web.UI.WebControls.PlaceHolder placeHolder; 22
23
/// <summary> 24
/// Create controls 25
/// </summary> 26
private void Page_Load(object sender, System.EventArgs e) 27
{ 28
// Create popup window and popup win anchor control 29
PopupWin popupWin=new PopupWin(); 30
PopupWinAnchor popupAnchor=new PopupWinAnchor(); 31
32
// Add controls to page 33
placeHolder.Controls.Add(popupAnchor); 34
placeHolder.Controls.Add(popupWin); 35
36
// Set anchor properties 37
popupAnchor.PopupToShow=popupWin.ClientID; 38
popupAnchor.LinkedControl="reopen"; 39
popupAnchor.HandledEvent="onclick"; 40
41
// Set popup win properties 42
popupWin.ActionType=EeekSoft.Web.PopupAction.MessageWindow; 43
popupWin.Title="This is popup"; 44
popupWin.Message="<i>Message</i> displayed in popup"; 45
popupWin.Text="Text to show in new window.."; 46
popupWin.HideAfter=5000; 47
48
// Show popup 49
popupWin.Visible=true; 50
popupWin.AutoShow=false; 51
} 52
53
54
override protected void OnInit(EventArgs e) 55
{ 56
InitializeComponent(); 57
base.OnInit(e); 58
} 59
60
Web Form Designer generated code 72
} 73
} 74





}