InAsppopup. aspx "target = _ blank _ fcksavedurl =" http://www.codeproject.com/aspnet/asppopup.asp ">Codeproject We can see a very good control that can completely customize the style, content, and links of the pop-up window. This control supportsMozilla,Internet ExplorerAndOperaI tried it and it worked very well. We recommend that you use it.
- Download demo project (C # and VB. NET)-38.1 Kb
- Download control with source-37.7 Kb
- Download control documentation-71.1 Kb
The following describes how to use this control with cookies to implement the function of reminding users only once after logon!
I. Define variables}
#region members
protected AgronetControl.PopupWin pwVegnet;
private string downmoontest="downmoontest";
#endregion
2. Button events
# RegionEvents
Private VoidPage_Load (ObjectSender, System. EventArgs e)
{
PwVegnet. LinkClicked+ =NewEventHandler (pwVegnet_LinkClicked );
This. PwVegnet. Visible=False;
If(!IsPostBack)
{
BoolBl=IsShowMessage ();
If(Bl)
{
SetMessage ();
SetCookies (downmoontest,"Yes",1);
}
Else
{
This. PwVegnet. Visible=False;
}
}
}
/// <Summary>
///Logout button
/// </Summary>
/// <Param name = "sender"> </param>
/// <Param name = "e"> </param>
Private VoidBtnLogOff_Click (ObjectSender, System. EventArgs e)
{
RemoveAll ();
}
Private VoidPwVegnet_LinkClicked (ObjectSender, EventArgs e)
{
//Here, you can add "whether or not to display a script like" --- downmoon
Page. Response. Redirect (@"Http://www.vegnet.com.cn/user/");
}
Iii. Main Methods:
#region Methods
private void SetMessage()
{
pwVegnet.HideAfter = 5000 ;
pwVegnet.Visible = true ;
pwVegnet.Title = textTitle.Text;
pwVegnet.Message = textMsg.Te