Dynamically create controls ?

Discussion in 'ASP .Net' started by Steven Caliendo, Dec 22, 2003.

  1. 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
     
    Steven Caliendo, Dec 22, 2003
    #1
    1. Advertising

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

    "Steven Caliendo" <> wrote in message
    news:#...
    > 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
    >
    >
     
    Kevin Spencer, Dec 22, 2003
    #2
    1. Advertising

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

    "Kevin Spencer" <> wrote in message
    news:...
    > 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.
    >
    > "Steven Caliendo" <> wrote in message
    > news:#...
    > > 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
    > >
    > >

    >
    >
     
    Steven Caliendo, Dec 22, 2003
    #3
  4. > 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.

    "Steven Caliendo" <> wrote in message
    news:...
    > 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
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > 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.
    > >
    > > "Steven Caliendo" <> wrote in message
    > > news:#...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Dec 22, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David J. Berman

    How do I dynamically create user controls?

    David J. Berman, Jun 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,413
    David J. Berman
    Jun 30, 2003
  2. tommy
    Replies:
    0
    Views:
    377
    tommy
    Jun 14, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]
    Replies:
    9
    Views:
    571
    RASTA
    Jun 17, 2004
  4. John Saunders
    Replies:
    0
    Views:
    375
    John Saunders
    Jul 15, 2004
  5. Jeffrey Todd
    Replies:
    1
    Views:
    4,120
    Peter Blum
    Jun 2, 2005
Loading...

Share This Page