Click here to Skip to main content
13,352,161 members (72,379 online)
Click here to Skip to main content
Add your own
alternative version


20 bookmarked
Posted 24 Oct 2013

Popup Control for ASP.NET

, 25 Oct 2013
Rate this:
Please Sign up or sign in to vote.
Easiest way to implement popup window in ASP.NET


This tip demonstrates how to implement a movable Popup window in ASP.NET. A very important feature of this control is that it can be used on most of the current browsers. It has been tested with the latest version of Mozilla, Internet Explorer, and Opera.


Most of the time, developers face the problem in popup windows to automatically a hide popup window after a post back event because they use AJAX controls. In this tip, I provide you with an easy way to implement a popup window in ASP.NET without writing too much code.


On Page design

There is very little coding necessary to implement a popup control. First, you need to add DDL in your project. And register assembly in your page by using the following code:

<%@ Register Assembly="ASP.Web.UI.PopupControl" 


    TagPrefix="ASPP" %>  

After that, declare the control in the Page design (.Aspx). Whatever you want to show as popup, put into the PopupWindow tag in the following way:

<ASPP:PopupPanel HeaderText="This is Header" ID="pup" 

          runat="server" OnCloseWindowClick="MycloseWindow">
    <PopupWindow runat="server">
        <ASPP:PopupWindow ID="PopupWindow1" 

        Visible="false" runat="server">
            <asp:Label ID="lbl" runat="server">ssssssssss</asp:Label>
            <br />
            <asp:TextBox ID="txt" AutoPostBack="true" 

        <ASPP:PopupWindow ID="PopupWindow2" runat="server">
            <div align="center" style="width: 500px; height: 300px">
                <asp:Label ID="Label1" runat="server">nnnnn</asp:Label>
                <br />
                <asp:TextBox ID="TextBox1" AutoPostBack="true" 

                <asp:Button ID="in" runat="server" Text="sss" />
                <asp:TextBox ID="TextBox2" AutoPostBack="true" 


On code behind

For showing purposes, use:

protected void Button1_Click(object sender, EventArgs e)

For hiding purposes, use:

protected void Button2_Click(object sender, EventArgs e)


After closing, window click event is generated if you assign to OnCloseWindowClick in popup control:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

You may also be interested in...


Comments and Discussions

QuestionI need full dll Pin
raj23136215-Jan-18 20:13
memberraj23136215-Jan-18 20:13 
QuestionDLL Pin
Member 1353597322-Nov-17 22:49
memberMember 1353597322-Nov-17 22:49 
QuestionDLL Pin
Daniel Sun30-Aug-17 8:41
memberDaniel Sun30-Aug-17 8:41 
QuestionUnlimited version Pin
jreyesverac23-Apr-17 20:44
professionaljreyesverac23-Apr-17 20:44 
AnswerRe: Unlimited version Pin
OriginalGriff23-Apr-17 20:46
protectorOriginalGriff23-Apr-17 20:46 
AnswerRe: Unlimited Dll Pin
OriginalGriff31-Mar-17 2:31
protectorOriginalGriff31-Mar-17 2:31 
QuestionDLL Pin
Kelrock31422-Nov-16 10:41
memberKelrock31422-Nov-16 10:41 
QuestionSpot on Pin
TonyOrchard28-Oct-16 3:25
memberTonyOrchard28-Oct-16 3:25 
QuestionDLL Pin
Member 1263528119-Jul-16 5:15
memberMember 1263528119-Jul-16 5:15 
QuestionDLL Pin
Member 1246980219-Apr-16 0:24
memberMember 1246980219-Apr-16 0:24 
QuestionDLL Pin
tdt2326-Feb-16 4:35
membertdt2326-Feb-16 4:35 
QuestionNeed the full version Pin
Member 1201870215-Oct-15 2:26
memberMember 1201870215-Oct-15 2:26 
QuestionPlease send me full dll Pin
reljabg3-Oct-15 3:24
memberreljabg3-Oct-15 3:24 
QuestionDLL without the 100 click restriction Pin
sviluppo29-Sep-15 22:26
membersviluppo29-Sep-15 22:26 
Questionfull DLL Pin
aris_ah13-Sep-15 10:47
memberaris_ah13-Sep-15 10:47 
QuestionFull DLL Pin
heihei200111-Sep-15 1:32
memberheihei200111-Sep-15 1:32 
QuestionPlease send me full dll Pin
ov.lovyannikov8-Sep-15 22:06
memberov.lovyannikov8-Sep-15 22:06 
QuestionMycloseWindow ??? Pin
Shrikesh_kale12-Aug-15 0:34
memberShrikesh_kale12-Aug-15 0:34 
QuestionDLL Pin
Member 1046349128-Jul-15 0:57
memberMember 1046349128-Jul-15 0:57 
QuestionPlease! could you send me the full dll?? Pin
Member 1183507213-Jul-15 19:28
memberMember 1183507213-Jul-15 19:28 
QuestionBad Content Pin
Member 1166801813-Jul-15 18:18
memberMember 1166801813-Jul-15 18:18 
QuestionPlease send DLL Pin
RudySteinhoff16-Jun-15 7:15
memberRudySteinhoff16-Jun-15 7:15 
Questiondll Pin
Member 113959437-Jun-15 5:10
memberMember 113959437-Jun-15 5:10 
Questionfull DLL Pin
Member 1094028431-May-15 21:39
memberMember 1094028431-May-15 21:39 
QuestionCould you send me the full dll ? Pin
Member 1160363910-May-15 1:53
memberMember 1160363910-May-15 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 25 Oct 2013
Article Copyright 2013 by Nikhil Awatade
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid