G
Guest
Hi
I would ask this questiopn on the NG ASP but it would be days before anyone
might respond.
I am using vb.net code behind to create buttons to add to a web form.
After the buttons are created I get this error:
((Control '_ctl0' of type 'Button' must be placed inside a form tag with
runat=server.))
My Code example:
Dim mybutton As Button
Dim i As Integer
For i = 0 To 9
mybutton = New Button
mybutton.BackColor = Drawing.Color.Blue
mybutton.Text = (i + 1).ToString
mybutton.Width = New Unit(35)
Me.Controls.Add(mybutton)
AddHandler mybutton.Click, AddressOf mybutton_Click
Me.Controls.Add(New LiteralControl("<BR>"))
Next
Thanks for any help
BrianDH
I would ask this questiopn on the NG ASP but it would be days before anyone
might respond.
I am using vb.net code behind to create buttons to add to a web form.
After the buttons are created I get this error:
((Control '_ctl0' of type 'Button' must be placed inside a form tag with
runat=server.))
My Code example:
Dim mybutton As Button
Dim i As Integer
For i = 0 To 9
mybutton = New Button
mybutton.BackColor = Drawing.Color.Blue
mybutton.Text = (i + 1).ToString
mybutton.Width = New Unit(35)
Me.Controls.Add(mybutton)
AddHandler mybutton.Click, AddressOf mybutton_Click
Me.Controls.Add(New LiteralControl("<BR>"))
Next
Thanks for any help
BrianDH