Close button for a popup

Posted on 2011-10-17
Last Modified: 2012-05-12
I have this example

Click on "show dialog" and you'll see a close button. If you click that, the popup closes. I dont see the code for it. I see "OnClientClose". So in my popup-aspx code i should add a close button and that javascript will take care of it?? I googled for other examples and not much luck
Question by:Camillia
    LVL 13

    Expert Comment

    I think that the close button is automatically there and needs no special handling.
    LVL 82

    Accepted Solution

    See here:

    This is what I use in a popup window:

    <input type=button value="Close This Window" onClick="javascript:window.close();">
    LVL 7

    Author Comment

    it's not there automatically. Let me look at Dave's example.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now