Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: The loading and programmatic access of UserControls from WebForms


Message #1 by "Tomasz Szypilo" <Tomasz.Szypilo@c...> on Sun, 16 Feb 2003 00:06:13
I did like this for Collection inside UserControl:

1. Create myUserControl.ascx
    ...
Private oCol as New Collection
    ...
Public ReadOnly Property PathList() as Collection
      Get 
          Return oCol
      End Get
End Property

2. Declare and create new instance of UserControl.ascx in WebForm.aspx

   Dim myList as myUserControl = Page.LoadControl("")
       myList.PathList.Add("c:\folder")
   ....

3.   It's working for me..

  Return to Index