<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="Alert._Default" %>

<%@ Register Assembly="RadWindow.Net2" Namespace="Telerik.WebControls" TagPrefix="radW" %>
<!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>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">
  
  <script type="text/javascript">
    function confirmCallBack(clickedYes, obj)
    {
      var returnValue = clickedYes ? "deleted." : "not deleted."; 
      var message = 'Order ' + obj.Number + 
        ' with ' + obj.ItemCount + ' items ' + returnValue; 
      radalert(message);
    }

    function confirm()
    {
      var order = new Object(); 
      order.Number = 12345; 
      order.ItemCount = 5; 
      var message = 'Delete order number ' + order.Number + '?'; 
      radconfirm(message, confirmCallBack, 200, 100, order, 'Delete Order'); 
    }        
    
    function promptCallBack(userInput, obj)
    {      
      var message = 'Order ' + obj.Number + 
        ' with ' + obj.ItemCount + 
        ' items canceled.<br /><br /><b>Reason:</b> ' + userInput; 
      radalert(message);
    }

    function prompt()
    {
      var order = new Object(); 
      order.Number = 12345; 
      order.ItemCount = 5; 
      var message = 'Enter a cancel reason for order ' + order.Number + '.'; 
      radprompt(message, promptCallBack, 300, 100, order, 'Cancel Order'); 
    }  
    
  </script>

    <div>
      <radW:RadWindowManager ID="RadWindowManager1" runat="server">
      </radW:RadWindowManager>
      <button onclick="radalert('An <br /> <b>html</b> string.<br />', 200, 100, 'My Alert'); return false;">
        Alert</button>
      <button onclick="confirm();">Confirm</button>
      <button onclick="prompt();">Prompt</button>
    </div>
  </form>
</body>
</html>
