<%@ Page Language="VB" AutoEventWireup="false" CodeFile="InsertForm.aspx.vb" Inherits="InsertForm" %>

<!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>Insert form</title>
    <script type="text/javascript">
		function CloseAndRebind(arg)
		{
			GetRadWindow().Close();
			GetRadWindow().BrowserWindow.refreshGrid(arg);
		}
		
		function GetRadWindow()
		{
			var oWindow = null;
			if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
			else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)
				
			return oWindow;
		}

		function CancelEdit()
		{
		    GetRadWindow().Close();		
		}
		</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    			<table>
				<tr>
					<td>
						First name:
					</td>
					<td>
						<asp:TextBox id="TextBox1" Width="130px" runat="server" />
					</td>
				</tr>
				<tr>
					<td>
						Last name:
					</td>
					<td>
						<asp:TextBox id="TextBox2" Width="130px" runat="server" />
					</td>
				</tr>
				<tr>
					<td>
						Title:
					</td>
					<td>
						<asp:TextBox id="TextBox3" Width="130px" runat="server" />
					</td>
				</tr>
				<tr>
					<td align="right" colspan="2">
						<asp:Label ID="InjectScript" Runat="server"></asp:Label>
						<asp:button id="btnInsert" text="Insert" runat="server"></asp:button>&nbsp; <button onClick="CancelEdit()" type="button">
							Cancel</button>
					</td>
				</tr>
			</table>
    </div>
    </form>
</body>
</html>
