This article explains using the ModalPopup Extender
available in the ASP.NET Ajax Toolkit. ModalPopup Extender comes in handy when
you want to display information on the page modally. I have used it in a couple
of sites to display:
1. Tip of the day information
2. Login dialog box (display the login box modally and prevent
the user from accessing the links before he signs in to the system)
3. Displaying Master-Child info
In this article I will explain how to display master-child
information (Country - Cities) using ModalPopup Extender. The countries list
will be displayed in a grid, and selecting a country row in the grid will open
a modalpopup with all the cities available with the country. This example is taken
to explain the concept, but in real-time you will be doing something useful
like displaying all the employees in a GridView, and clicking on an employee
row will display the employee information like Contact Details, Salary Details,
etc.
All the necessary files, database, stylesheet and images
used in this article are available for download from the link provided at the
end of the article.
Note: The solution provided with this application is
developed using ASP.NET
AjaxToolkit version 1.0.11119.0 for ASP.NET AJAX version 1.0 and .NET Framework
2.0
A working example of this functionality can be seen at http://bg.analysterp.com. Click on the property
images in the first page and you will see the detailed information about the
selected property in a ModalPopup dialog. Ignore any errors if found, as the
site is still under development.