<%@ Page Language="C#" %>

<!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 id="Head1" runat="server">
  <title>ASP.NET AJAX</title>

  <script language="JavaScript" type="text/javascript">
  function pageLoad() {
    var button1 = new Sys.Preview.UI.Button($get("MessageBoxOK"));
    var button2 = new Sys.Preview.UI.Button($get("MessageBoxOKCancel"));
    var button3 = new Sys.Preview.UI.Button($get("InputBox"));

    button1.initialize();
    button2.initialize();
    button3.initialize();

    button1.add_click(MessageBoxOKClick);
    button2.add_click(MessageBoxOKCancelClick);
    button3.add_click(InputBoxClick);
  }

  function MessageBoxOKClick() {
    Sys.Preview.UI.Window.messageBox("Using Sys.Preview.UI.Window");
  }
  function MessageBoxOKCancelClick() {
    Sys.Preview.UI.Window.messageBox("Using Sys.Preview.UI.Window", Sys.Preview.UI.MessageBoxStyle.OKCancel);
  }
  function InputBoxClick() {
    Sys.Preview.UI.Window.inputBox("Using Sys.Preview.UI.Window", "<tu wpisz tekst>");
  }
  </script>

</head>
<body>
  <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
      <Scripts>
        <asp:ScriptReference Assembly="Microsoft.Web.Preview" Name="PreviewScript.js" />
      </Scripts>
    </asp:ScriptManager>
    <div>
      <input type="button" value="MessageBoxOK" id="MessageBoxOK" />
      <input type="button" value="MessageBoxOKCancel" id="MessageBoxOKCancel" />
      <input type="button" value="InputBox" id="InputBox" />
    </div>
  </form>
</body>
</html>
