<%@ Page Language="C#" %>

<%@ Reference Control="Listing25-7.ascx" %>

<script runat="server">
    void Page_Load(object sender, EventArgs e)
    {
        Control myForm = Page.FindControl("Form1");
        Listing25_7 c1 = 
            (Listing25_7)LoadControl("Listing25-7.ascx");
        myForm.Controls.Add(c1);

        c1.ID = "myListing25-7";
        c1.Text = "Tekst przypisany kontrolce użytkownika";
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
</html>
