<%@ Page language="c#" Codebehind="GoogleForm2.aspx.cs" AutoEventWireup="false" Inherits="GoogleControl.GoogleForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
    <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name=vs_defaultClientScript content="JavaScript (ECMAScript)">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
	<link rel="stylesheet" href="ControlCss.aspx" type="text/css">
	<script language="javascript">
function OnLoad() {
	if (parent && parent.document) {
		var c = null;
		var t = null;
		if (document.getElementById) { // Netscape 6.0+, Internet Explorer 5.0+
			var c = document.getElementById("Cpy");  
			var t = document.getElementById("Table1");
		} else
		if (document.all) {
			var c = document.all["Cpy"];  
			var t = document.all["Table1"]; 
		}
		var found = false;
		if (parent.document.getElementById) { // Netscape 6.0+, Internet Explorer 5.0+
			var fr = parent.document.getElementById("GoogleControl");
			if (fr && fr.setAttribute) {
				fr.setAttribute("height", c.offsetTop + 25);
				fr.setAttribute("width", (t.width * 1) + 20);
				found = true;
			}
		}
		if (!found) {
			if (parent.document.frames && parent.document.frames.GoogleControl &&
				parent.document.frames.GoogleControl.setAttribute) {
				alert("H=" + c.offsetTop + " W=" + t.width);
				parent.document.frames.GoogleControl.setAttribute("height", c.offsetTop + 25);
				parent.document.frames.GoogleControl.setAttribute("width", (t.width * 1) + 20);
			}
		}
	}
}
	</script>
  </HEAD>
  <body onload="OnLoad()">
	
    <form id="Form1" method="post" runat="server">
<table id="Table1">
  <tr>
    <td><asp:label id=title runat="server" Width="100%">Google control</asp:label></td></tr>
  <tr>
    <td><asp:textbox id=term runat="server" MaxLength="60"></asp:textbox></td></tr>
  <tr>
    <td><asp:button id=search Runat="server" Text="Search"></asp:button><asp:button id=clear Runat="server" Text="Clear"></asp:button></td></tr>
  <tr>
    <td><asp:datagrid id=result Runat="server" AutoGenerateColumns="False" DataKeyField="Key" Width="100%">
<Columns>
	<asp:ButtonColumn HeaderText="Action" ButtonType="PushButton" Text="Sel" CommandName="Select"/>
	<asp:HyperLinkColumn HeaderText="URL" DataTextField="URL" DataNavigateUrlField="URL" Target="_blank" ItemStyle-Width="48%"></asp:HyperLinkColumn>
	<asp:BoundColumn DataField="Title" HeaderText="Title" ItemStyle-Width="48%"></asp:BoundColumn>
</Columns>
</asp:datagrid></td></tr>
  <tr>
    <td><asp:datagrid id=detail Runat="server" AutoGenerateColumns="False" Width="100%">
<Columns>
	<asp:BoundColumn DataField="Name" HeaderText="Name" ItemStyle-Width="10%"></asp:BoundColumn>
	<asp:BoundColumn DataField="Value" HeaderText="Value" ItemStyle-Width="90%"></asp:BoundColumn>
</Columns>
</asp:datagrid></td></tr></table>
</form>
<asp:label id=copyright runat="server"><p id="Cpy"> 2002 Alexis Grandemange</p></asp:label>
	
  </body>
</HTML>