Pleae can someone run this code and take a look at why instead of looping 1 to 10 (10 times) why it executes twice over (i.e 1 to 20)<BR><BR>Thanks<BR><BR>&#060;script language = "vb" runat = "server"&#062;<BR><BR>Sub Page_Load(ByVal sender As System.Object, _<BR> ByVal e As System.EventArgs) Handles MyBase.Load<BR> <BR> Dim i as Integer<BR> Dim PixelY as Integer<BR> PixelY = 50<BR> For i = 1 to 10<BR> <BR> Dim button As New System.Web.UI.WebControls.Button()<BR> button.Text = "Click me"<BR> button.Style.Item("left") = "10px"<BR> button.Style.Item("top") = PixelY & "px"<BR> button.Style.Item("position") = "absolute"<BR> <BR> &#039;Dynamically assign name to button (does not work cos the for loop is being executed twice ???<BR> &#039;button.ID = "myButton" & i<BR> <BR> Me.FindControl("Form1").Controls.Add(button)<BR> <BR> PixelY += 30<BR> myDiv.innerHTML += "<BR>" & i<BR> Next<BR> <BR>End Sub<BR><BR>&#060;/script&#062;<BR><BR>&#060;div id = "myDiv" runat = "server" /&#062;<BR><BR>&#060;form id = "Form1" runat = "server"&#062;<BR> <BR>&#060;/form&#062;