Ranath Parmetta
Ranath Parmetta

Reputation: 3

Adding asplabel to .net aspx page with text

I want to add a label to .NET ASPX page. When I do <asp:label /> nothing appears? I want it to say "Hello World"

Upvotes: 0

Views: 64

Answers (2)

Richard Pursehouse
Richard Pursehouse

Reputation: 1129

You need to set the label to runat server, and then set its text.

<asp:label runat="server" Text="Hello World" />

Upvotes: 1

Vishal Suthar
Vishal Suthar

Reputation: 17194

I should be:

<asp:Label runat="server" Text="Hello World" />

Upvotes: 0

Related Questions