R
Robert Bull
I am trying to add a radio button at runtime in an asp.net web form
but I keep getting the error message "type 'RadioButton' must be
placed inside a form tag with runat=server". I use the following code:
Dim rbYes As New RadioButton()
dim sStyle as string
sStyle = "POSITION:absolute; TOP: 250px; LEFT: 10px"
rbYes.Attributes.Add("style", sStyle)
rbYes.Attributes.Add("runat", "server")
Me.Controls.Add(rbYes)
It is as if the rbYes.Attributes.Add("runat", "server") line is not
being executed. Any help would be great. Thanks
-Rob
but I keep getting the error message "type 'RadioButton' must be
placed inside a form tag with runat=server". I use the following code:
Dim rbYes As New RadioButton()
dim sStyle as string
sStyle = "POSITION:absolute; TOP: 250px; LEFT: 10px"
rbYes.Attributes.Add("style", sStyle)
rbYes.Attributes.Add("runat", "server")
Me.Controls.Add(rbYes)
It is as if the rbYes.Attributes.Add("runat", "server") line is not
being executed. Any help would be great. Thanks
-Rob