R
Ranginald
I have a page, default.aspx.cs that instantiates a label, label1 and
adds some properties to the label:
Label Label1 = new Label();
this.Controls.Add(Label1);
Label1.BackColor = System.Drawing.Color.Pink;
Label1.Text = "Lefantze test: _Default class";
===============
On the default.aspx page, the html is as follows:
<asp:Label ID="Label1" Text="Ranginald" BorderColor="Gold"
runat="server" Width="266px" BorderWidth="10px"></asp:Label></div>
</form>
When I compile and run the page, I have two textboxes -- and they are
both label1.
Why is this happening? I thought there could be only one control with
the name label1?
(Note that in design view, only one label is shown and that's the one
in the html)
Thanks!
adds some properties to the label:
Label Label1 = new Label();
this.Controls.Add(Label1);
Label1.BackColor = System.Drawing.Color.Pink;
Label1.Text = "Lefantze test: _Default class";
===============
On the default.aspx page, the html is as follows:
<asp:Label ID="Label1" Text="Ranginald" BorderColor="Gold"
runat="server" Width="266px" BorderWidth="10px"></asp:Label></div>
</form>
When I compile and run the page, I have two textboxes -- and they are
both label1.
Why is this happening? I thought there could be only one control with
the name label1?
(Note that in design view, only one label is shown and that's the one
in the html)
Thanks!