Dynamically create controls ?

  • Thread starter Thread starter Steven Caliendo
  • Start date Start date
S

Steven Caliendo

Hi,

What I would like to do is have a different number of controls on a web form
based on a users configuration. So, some users will need 5 textboxes, and
some will only need 1. I don't want to use the .visible property, and
design a form that always has the maximum # of textboxes on it. Is it
possible to dim an object as a new control, and then dynamically place it on
the web form when the page loads?

Thanks,

Steve
 
Yes, it most certainly is. And there are about a half-dozen ways to do it,
depending upon your app's requirements.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Ok, Great ! So how about just one of them? I know dim'ing an object works,
but there doesn't appear to be top & left properties, so how do I place
them?

Thanks,

Steve
 
Ok, Great ! So how about just one of them? I know dim'ing an object
works,
but there doesn't appear to be top & left properties, so how do I place
them?

Well, Steve, it's a can of worms. Not exactly something I could write a
couple of paragraphs on and send you on your way. Instead, I'm sending a
link to the freely downloadable Microsoft .Net SDK, which will tell you
everything you need to know about this and probably any other question you
can come up with.

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

If, after checking out the SDK, you have any specific questions, come on
back. Happy Holidays!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top