In this article I will explain how to create Modal Popup Window using jQuery UI Modal Dialog in ASP.Net and how to open the modal popup as soon as page loads in browser
Open ( Show ) jQuery UI Modal Dialog Popup Window on Page Load
 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"
    rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(function () {
        $("#dialog").dialog({
            title: "jQuery Dialog Popup",
            buttons: {
                Close: function () {
                    $(this).dialog('close');
                }
            }
        });
    });
</script>
<div id="dialog" style="display: none">
    This is a simple popup
</div>
 
Explanation:
The jQuery UI Modal Dialog requires a HTML DIV that acts as the content in other words body of the popup window. I have applied the jQuery UI Modal Dialog plugin to the dialog HTML DIV and also set its Title property. To open and display the jQuery UI Modal Popup on page load I have made use of the jQuery $(function () method which gets fired as soon as the page is loaded in the browser.
 
Demo
 
Downloads