creating new control in code behind
-
Hi, I have the following code: Label lb1 = new Label(); lb1.Text = "test"; but this isnt displaying on my page I know this is very simple, think my brain has gone dead today!! thanks guys.
Think it may be because your label needs and id?
"Sex is not the answer, it's the question and the answer is yes"
-
Hi, I have the following code: Label lb1 = new Label(); lb1.Text = "test"; but this isnt displaying on my page I know this is very simple, think my brain has gone dead today!! thanks guys.
-
here is your code. Label mylable = new Label(); mylable.Text = "test"; this.Controls.Add(mylable);
-
Hi, I have the following code: Label lb1 = new Label(); lb1.Text = "test"; but this isnt displaying on my page I know this is very simple, think my brain has gone dead today!! thanks guys.
drag a placeholder and assign the parent property of label to placeholder