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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Trace in Action!</title>

    <script type="text/javascript">
    function trace() {
        Sys.Debug.trace($get("txtTraceMessage").value);
    }
    
    function traceDump() {
        var name = $get("txtPublisherName").value;
        var city = $get("txtPublisherCity").value;
        var myPublisher = new Books.Publishers.Publisher(name, city);
        Sys.Debug.traceDump(myPublisher);
    }
    
    function clearTrace() {
        Sys.Debug.clearTrace();
    }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="SM1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Publisher.js" />
        </Scripts>
        <Services>
            <asp:ServiceReference Path="~/WebService1.asmx" />
        </Services>
    </asp:ScriptManager>

    <script type="text/javascript">
        var publisher = new Books.Publishers.
    </script>
    
    
    
    
    
    
    

    <textarea id="TraceConsole" style="width: 400px; height: 200px;" cols="1" rows="1"></textarea>
    <br />
    <span>Komunikat diagnostyczny:&nbsp;</span>
    <input type="text" id="txtTraceMessage" /><input type="button" onclick="trace();"
        value="Dopisz ślad stosu" />
    <br />
    <span>Nazwa wydawcy:&nbsp;</span><input type="text" id="txtPublisherName" />
    <span>Miasto wydawcy:&nbsp;</span><input type="text" id="txtPublisherCity" />
    <input type="button" onclick="traceDump();" value="Zrzuć obiekt Publisher" />
    <br />
    <input type="button" onclick="clearTrace();" value="Wyczyść ślad stosu" />
    </form>
</body>
</html>
