Click here to Skip to main content
15,891,828 members
Articles / Web Development / ASP.NET

ASP.NET Popup Control

Rate me:
Please Sign up or sign in to vote.
4.87/5 (617 votes)
21 Apr 2004Ms-PL5 min read 3.3M   98.5K   1.2K  
Highly customizable JavaScript popup control for web page wrapped in ASP.NET custom control.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace EeekSoft.PopupTest
{
	/// <summary>
	/// Summary description for anchor.
	/// </summary>
	public class anchor : System.Web.UI.Page
	{
    protected System.Web.UI.WebControls.Label Label1;
    protected System.Web.UI.WebControls.Label Label2;
    protected System.Web.UI.WebControls.Label Label3;
    protected System.Web.UI.WebControls.TextBox textTitle;
    protected System.Web.UI.WebControls.TextBox textMsg;
    protected System.Web.UI.WebControls.Button btnSetProp;
    protected System.Web.UI.WebControls.Label Label4;
    protected System.Web.UI.WebControls.Label Label5;
    protected System.Web.UI.WebControls.Label Label6;
    protected System.Web.UI.WebControls.Label Label7;
    protected System.Web.UI.WebControls.Label Label8;
    protected EeekSoft.Web.PopupWin popupHelp;
    protected System.Web.UI.WebControls.TextBox textFirst;
    protected System.Web.UI.WebControls.TextBox textSecond;
    protected EeekSoft.Web.PopupWinAnchor helpFirst;
    protected EeekSoft.Web.PopupWinAnchor helpSecond;
    protected EeekSoft.Web.PopupWinAnchor showTest;
    protected EeekSoft.Web.PopupWin popupTest;
    protected System.Web.UI.WebControls.TextBox textText;
    protected System.Web.UI.WebControls.Label Label9;
    protected System.Web.UI.WebControls.HyperLink HyperLink2;
    protected System.Web.UI.WebControls.HyperLink HyperLink1;
  
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
      this.btnSetProp.Click += new System.EventHandler(this.btnSetProp_Click);
      this.Load += new System.EventHandler(this.Page_Load);

    }
		#endregion

    private void btnSetProp_Click(object sender, System.EventArgs e)
    {
      showTest.NewMessage=textMsg.Text;
      showTest.NewText=textText.Text;
      showTest.NewTitle=textTitle.Text;
    }
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Czech Republic Czech Republic
I live in Prague, the capital city of Czech republic (most of the time Smile | :) ). I've been very interested in functional programming recently and I have a passion for the new Microsoft F# language. I'm writing a book about Functional Programming in the Real World that shows the ideas using examples in C# 3.0 and F#.

I've been Microsoft MVP (for C#) since 2004 and I'm one of the most active members of the F# community. I'm a computer science student at Charles University of Prague. My hobbies include photography, fractals and of course many things related to computers (except fixing them). My favorite book writers are Terry Pratchett and Philip K Dick and I like paintings by M. C. Escher.

PS: My favorite codeproject icon is Sheep | [baah] .

Comments and Discussions