Dynamically create controls ?

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
 
K

Kevin Spencer

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.
 
S

Steven Caliendo

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
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top