LoadControl method example (VB.net) : Load Control « Page « ASP.Net






LoadControl method example (VB.net)

<%@ Page Language="vb" %>
<html>
   <head>
      <title>LoadControl method example</title>
      <script runat="server">
         Sub Page_Load()
            Dim Hello As UserControl = LoadControl("BulletList.ascx")
            Page.Controls.Add(Hello)
         End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>
           
       








Related examples in the same category

1.Add asp:TextBox to page dynamically (VB.net)
2.Find control in a page (C#)
3.Use propery defined in asp.net control (C#)
4.Pass parameter to page control (C#)