[求助]必须放在具有 runat=server 的窗体标记内
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Integer
Dim a(9) As ImageButton
For n = 0 To 9
a(n) = New ImageButton
a(n).BackColor = Color.Red
a(n).ID = " pic" & (n + 1)
Me.Controls.Add(a(n))
Next
End Sub
类型“ImageButton”的控件“ pic1”必须放在具有 runat=server 的窗体标记内。
这是什么原因呢 该怎么解决,请求帮助,谢谢!