1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
   | <%@ Page Language="C#" ClassName="Page1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    protected void BT_SUBMIT_Click(object sender, EventArgs e) {
        Server.Transfer("Page2.aspx");
    }
</script>
<head>
    <script type="text/javascript">
        function ShowSearchPopup(){
            window.open ('PopupSearchName.aspx?targetfieldid=<%=TB_NOM.ClientID %>', 'nom_interne_de_la_fenetre', config='height=300, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no')
        }
    </script>
</head>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <form id="form1" runat="server">
        Votre nom svp : <asp:TextBox ID="TB_NOM" runat="server"></asp:TextBox>
        <a href="javascript:ShowSearchPopup()">Rechercher</a>
        <asp:Button ID="BT_SUBMIT" runat="server" Text="Envoyer (Server.Transfer(Page2))" 
            onclick="BT_SUBMIT_Click" />
        <asp:Button runat="server" PostBackUrl="~/Page2.aspx" Text="Envoyer (PostBackUrl=Page2)"/>
    </form>
</body>
</html> | 
Partager