Dynamic add labels to a form.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Dynamic add labels to a form.

    I have this in code:
    Label myLabel1 = new Label();

    myLabel1.Text ="Pick the Row you need changed in the Database";

    myLabel1.Enabled = true;

    myLabel1.Visible =true;



    I don't see the lable on my webform. How do I referesh() the page like a
    post_back?


    --
    Stephen Russell
    S.R. & Associates
    Memphis TN

    901.246-0159


    Stephen Russell Guest

  2. Similar Questions and Discussions

    1. Need help creating dynamic form
      I guess I am just looking for some php help here more than anything. I want to know if it is possible to do the following things in php. I have a...
    2. Dynamic form problem
      I have a form that generates dynamic fields that the user can fill. The problem I'm having is with the form processing. So for example if a user...
    3. Dynamic Labels Flash CFMX7
      Well, I've been working almost all of my datafield problems and I realized I need to put info on the form that updates when a button is clicked....
    4. [PHP] Dynamic Form checking
      if $quantity isn't filled you get NULL or FALSE. so you could use: if ($_POST) etc. Try posting less code and more question to the list. ...
    5. Dynamic Form checking
      hi this is the dynamic forms ...
  3. #2

    Default Re: Dynamic add labels to a form.

    You never added the label to your page. You only created the object.

    "Stephen Russell" <srussell@notat_lotmate.com> wrote in message
    news:%23ZYuOVEYDHA.652@tk2msftngp13.phx.gbl...
    > I have this in code:
    > Label myLabel1 = new Label();
    >
    > myLabel1.Text ="Pick the Row you need changed in the Database";
    >
    > myLabel1.Enabled = true;
    >
    > myLabel1.Visible =true;
    >
    >
    >
    > I don't see the lable on my webform. How do I referesh() the page like a
    > post_back?
    >
    >
    > --
    > Stephen Russell
    > S.R. & Associates
    > Memphis TN
    >
    > 901.246-0159
    >
    >

    Marina Guest

  4. #3

    Default Re: Dynamic add labels to a form.

    How do I do that dynamically? I have a page that needs a few things added
    and by selection different stuff happens.

    Thanks for the quick response!

    __Stephen


    "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
    news:%23Zei6XEYDHA.2328@TK2MSFTNGP12.phx.gbl...
    > You never added the label to your page. You only created the object.
    >
    > "Stephen Russell" <srussell@notat_lotmate.com> wrote in message
    > news:%23ZYuOVEYDHA.652@tk2msftngp13.phx.gbl...
    > > I have this in code:
    > > Label myLabel1 = new Label();
    > >
    > > myLabel1.Text ="Pick the Row you need changed in the Database";
    > >
    > > myLabel1.Enabled = true;
    > >
    > > myLabel1.Visible =true;
    > >
    > >
    > >
    > > I don't see the lable on my webform. How do I referesh() the page like
    a
    > > post_back?
    > >
    > >
    > > --
    > > Stephen Russell
    > > S.R. & Associates
    > > Memphis TN
    > >
    > > 901.246-0159
    > >
    > >
    >
    >

    Stephen Russell Guest

  5. #4

    Default Re: Dynamic add labels to a form.

    Stephen,

    If you're going to be dynamically loading different controls onto your page
    you could take a look at a bit of sample code I have on my website,
    [url]www.aboutfortunate.com[/url]. Just search the code library for: "Create dynamic
    controls" or something similar.

    The sample code I provide specifically adds text boxes to the form. The
    trick to the code is recreating the controls on post back in order to be
    able to access their values.

    You would be able to add a label control the same way I'm adding the text
    boxes. You just wouldn't need to recreate them on post back.

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Stephen Russell" <srussell@notat_lotmate.com> wrote in message
    news:%23$UupaEYDHA.1748@TK2MSFTNGP12.phx.gbl...
    > How do I do that dynamically? I have a page that needs a few things added
    > and by selection different stuff happens.
    >
    > Thanks for the quick response!
    >
    > __Stephen
    >
    >
    > "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
    > news:%23Zei6XEYDHA.2328@TK2MSFTNGP12.phx.gbl...
    > > You never added the label to your page. You only created the object.
    > >
    > > "Stephen Russell" <srussell@notat_lotmate.com> wrote in message
    > > news:%23ZYuOVEYDHA.652@tk2msftngp13.phx.gbl...
    > > > I have this in code:
    > > > Label myLabel1 = new Label();
    > > >
    > > > myLabel1.Text ="Pick the Row you need changed in the Database";
    > > >
    > > > myLabel1.Enabled = true;
    > > >
    > > > myLabel1.Visible =true;
    > > >
    > > >
    > > >
    > > > I don't see the lable on my webform. How do I referesh() the page
    like
    > a
    > > > post_back?
    > > >
    > > >
    > > > --
    > > > Stephen Russell
    > > > S.R. & Associates
    > > > Memphis TN
    > > >
    > > > 901.246-0159
    > > >
    > > >
    > >
    > >
    >
    >

    S. Justin Gengo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139