<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="C1UpgradeIssuesProject._Default" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1Dialog" TagPrefix="wijmo" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <main>
        <script type="text/javascript">
            function C1Dialog1_OnClientBeforeClose(sender, args) {
                alert("c1dialog closing...");
            }

            function openDialog() {
                console.log("opening...")
                $('#<%= C1Dialog1.ClientID %>').c1dialog('open');
            }
        </script>

        <button type="button" onclick="openDialog()">Open Dialog</button>

        <wijmo:C1Dialog
            ID="C1Dialog1"
            runat="server"
            OnClientBeforeClose="C1Dialog1_OnClientBeforeClose">

            <Content>
                Hello World!<br/><br/>
                <button type="button"
                    onclick="$('#<%= C1Dialog1.ClientID %>').c1dialog('close')">
                    Close
                </button>
            </Content>

        </wijmo:C1Dialog>
    </main>

</asp:Content>
