G
Guest
I have created a Datagrid in code, added it to the Controls collection and
set it's DataSource. All works fine. I try the same thing with a button
(create an instance, add it to the controls collection), it doesn't want to
know. I just get an error stating:
"Control '_ctl1' of type 'Button' must be placed inside a Form tag with
runat=server".
Can anyone suggest why it let me create and display the DataGrid but not a
Button?
set it's DataSource. All works fine. I try the same thing with a button
(create an instance, add it to the controls collection), it doesn't want to
know. I just get an error stating:
"Control '_ctl1' of type 'Button' must be placed inside a Form tag with
runat=server".
Can anyone suggest why it let me create and display the DataGrid but not a
Button?