B
B. Chernick
(I've been away from web app programming for a while. Most of my experience
has been in 1.1. Now I'm using vb/Dot Net 2.0)
Please explain a couple of things.
First, I have a simple-minded usercontrol defined. No real code so far.
Just a bunch of text boxes on a panel. I want to dynamically load one or
more instances of the usercontrol onto the screen.
Why is it that the command 'Me.Form.Controls.Add' will work with stock
controls (like a textbox) but apparently not with usercontrols? (After a
little bit of trial and error I found I could create usercontrols with the
'LoadControl' command. I think this is the first time I've heard of
'LoadControl'.)
2nd, in a basic web page, a control can be dynamically added with a call to
the default 'form1.controls.add'. My current test page has a master page and
I've found that 'form1' is not available. However 'Me.Form.Controls.Add()'
seems to work the same. Are there any 'gotchas' here that I should be aware
of?
has been in 1.1. Now I'm using vb/Dot Net 2.0)
Please explain a couple of things.
First, I have a simple-minded usercontrol defined. No real code so far.
Just a bunch of text boxes on a panel. I want to dynamically load one or
more instances of the usercontrol onto the screen.
Why is it that the command 'Me.Form.Controls.Add' will work with stock
controls (like a textbox) but apparently not with usercontrols? (After a
little bit of trial and error I found I could create usercontrols with the
'LoadControl' command. I think this is the first time I've heard of
'LoadControl'.)
2nd, in a basic web page, a control can be dynamically added with a call to
the default 'form1.controls.add'. My current test page has a master page and
I've found that 'form1' is not available. However 'Me.Form.Controls.Add()'
seems to work the same. Are there any 'gotchas' here that I should be aware
of?