How to write code and design?

Discussion in 'ASP .Net Web Controls' started by Vasant, Dec 10, 2007.

  1. Vasant

    Vasant Guest

    How to make Textbox and Button like
    at 1 time
    Textbox Button


    at 2 time
    Textbox Button
    Textbox Button


    Thank you.
     
    Vasant, Dec 10, 2007
    #1
    1. Advertising

  2. Vasant

    John Padilla Guest

    depending on what container you wish to place the buttons into (ie the form,
    panel etc) you do i like this:

    the current webform:

    This code happens in some type of event of your choosing:

    string[] count = new string[2];
    count[0] = "btOne";
    count[1] = "btTwo";

    this.Controls.Add((new TextBox()).ID = count[0]);
    this.Controls.Add((new TextBox()).ID = count[1]);

    Vy putting the ID value you can reflect through the this.Controls list and
    find your new text boxes by name and set other properties.

    Hope this helps

    "Vasant" wrote:

    > How to make Textbox and Button like
    > at 1 time
    > Textbox Button
    >
    >
    > at 2 time
    > Textbox Button
    > Textbox Button
    >
    >
    > Thank you.
    >
     
    John Padilla, Dec 15, 2007
    #2
    1. Advertising

  3. Vasant

    John Padilla Guest

    I forgot to add something.

    Once you add your controls you can reference them by the Id value. To format
    them you will also need to add a div or 2 into the panel and put the textbox
    insid eeach div and use the div (as a server side control) to arange the
    locations of the text boxes within the panel. You can also use CSS.

    "Vasant" wrote:

    > How to make Textbox and Button like
    > at 1 time
    > Textbox Button
    >
    >
    > at 2 time
    > Textbox Button
    > Textbox Button
    >
    >
    > Thank you.
    >
     
    John Padilla, Dec 15, 2007
    #3
    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. ZackS
    Replies:
    5
    Views:
    6,809
    Just an Illusion
    Jul 9, 2004
  2. SpamProof
    Replies:
    3
    Views:
    652
    SpamProof
    Dec 1, 2003
  3. Peter Hansen
    Replies:
    1
    Views:
    393
    Joona I Palaste
    Aug 24, 2003
  4. Peter Hansen
    Replies:
    1
    Views:
    419
    Joona I Palaste
    Aug 24, 2003
  5. Frank Peterson
    Replies:
    9
    Views:
    234
    David Mark
    Jun 28, 2009
Loading...

Share This Page