How to have multiple dynamic control container in webform?

Hi Master!

I just want to refer you my exploratory code. I want to have dynamic multiple control container on my webform. Below is my code, but when I execute, only one instance of the container appear.
Please guide me on why it does not work.

  
  Dim objMyContainer As New label1
   dim w as integer
  dim l as integer
  dim i as integer
 
  
  '//auto CENTER THE CONTROL
  w = self.width
  l =( w - objMyContainer.width) /2
   
'//Start to show multiple dynamic label propagated across the web form
  for i = 100 to 1000 step 100
    objMyContainer.EmbedWithin(self, l, i, objMyContainer.width +10, objMyContainer.height +10)
  next i

Hi Masters!

I made to fix this problem by changing some part of my code. For some people who also explore this scenario, here is the additional code I made to fix the problem.


Dim objMyContainer As   label1

for i = 100 to 1000 step 100
     objMyContainer = new label1
     objMyContainer.EmbedWithin(self, l, i, objMyContainer.width +10, objMyContainer.height +10)
  next i

IT WORK GREAT!