Torna al Thread
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="WebForm.aspx.cs" Inherits="WebTotem.WebForm" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
function btnClick() {
var txt1 = window.parent.document.getElementById("<% =TextBox1.UniqueID %>");
var txt2 = window.parent.document.getElementById("<% =TextBox2.UniqueID %>");
if ( txt1.focused )
txt1.value = "ciao"
else
txt2.value = "ciao";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return btnClick();" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>