Creating a Control in a web form Dynamically

Discussion in 'ASP .Net Web Controls' started by tacoturtle, Jun 26, 2004.

  1. tacoturtle

    tacoturtle Guest

    on the page init dim a new object as label. set its properties accordingly. then load the control using page.loadcontrol. Then you can use page.controls.add to put it on the page. You could create a panel or placeholder to add the label to also. Just drag one over on the page and give it a name. Then after using the loadcontrol, use page.findcontrol("myplaceholder").controls.add(labelcontrol) to put it in the place holder.
    tacoturtle

    "Haitham" wrote:

    > Hi all,
    >
    > May you kindly tell me how to create a label control in the web form
    > dynamically and change its width and top properties
    >
    > thanks in advance
    >
    >
    >
     
    tacoturtle, Jun 26, 2004
    #1
    1. Advertisements

  2. tacoturtle

    Haitham Guest

    Hi all,

    May you kindly tell me how to create a label control in the web form
    dynamically and change its width and top properties

    thanks in advance
     
    Haitham, Jun 26, 2004
    #2
    1. Advertisements

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. owen
    Replies:
    6
    Views:
    13,205
    karthickreddyk
    Aug 19, 2010
  2. Test Message

    Dynamically add a control to web form

    Test Message, Oct 30, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    737
    Scott Natwick
    Nov 1, 2004
  3. Reny J Joseph Thuthikattu
    Replies:
    1
    Views:
    824
    =?Utf-8?B?UHJha2FzaC5ORVQ=?=
    Dec 30, 2004
  4. =?Utf-8?B?UGF0cmljaw==?=

    Dynamically creating a web form with server controls

    =?Utf-8?B?UGF0cmljaw==?=, May 20, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    852
    Steven Cheng[MSFT]
    May 23, 2005
  5. Ravi Ambros Wallau
    Replies:
    0
    Views:
    4,253
    Ravi Ambros Wallau
    Jun 1, 2005
  6. Jheitmuller

    Is it possible to dynamically size a control on a web form?

    Jheitmuller, Feb 5, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    133
    David Coe
    Feb 7, 2004
  7. Ravi Ambros Wallau
    Replies:
    0
    Views:
    474
    Ravi Ambros Wallau
    Jun 1, 2005
  8. Replies:
    0
    Views:
    1,094
Loading...