<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoadEvent.aspx.cs" Inherits="Chapter_9.LoadEvent" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Controls" Namespace="Controls" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Load Event Test Page</title>
</head>
<body style="width: 1000px; height: 768px">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="SM1" runat="server" />
    <asp:UpdatePanel ID="UP1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div style="position:absolute; top:100px; left:225px">
                <cc1:HoverCard ID="InsideUpdatePanelHC" runat="server" />
            </div>
            <asp:Button ID="tstButton" Text="Update" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <cc1:HoverCard ID="OutsideUpdatePanelHC" runat="server" />
    </form>
</body>

<script type="text/javascript">
    function loadHandler(sender, args) {
        Sys.Debug.trace(String.format("In partial postback: {0}", args.get_isPartialLoad()));
        var comps = args.get_components();
        for (var i=0; i<comps.length; i++) {
            Sys.Debug.trace(String.format("Created Component: {0}", comps[i].get_id()));
        }
    }
    Sys.Application.add_load(loadHandler);
</script>

</html>
