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

<%@ Reference Control="~/Listing26-7.ascx" %>

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

        c1.ID = "myWebUserControl1";
        c1.Text = "My users controls text";
    }
</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>
