YouTip LogoYouTip

Prop Webcontrol Listcontrol Text

.container { margin-top: 20px; } .sidebar { background-color: #f5f5f5; padding: 15px; border-radius: 4px; margin-bottom: 20px; } .navbar { margin-bottom: 20px; } .highlight { background-color: #f8f9fa; padding: 15px; border: 1px solid #ddd; border-radius: 4px; overflow-x: auto; }

ASP.NET Text Property | .com

Learn not just technology, but also dreams!

ASP.NET Text Property

The Text property is used to get or set the text displayed in a control.

Syntax

object.Text = "text"
string text = object.Text

Example

The following example demonstrates how to use the Text property of a Label control:

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

Explanation

In this example, the Label control displays the text "Hello World!" on the page.

Related Properties

  • Text - Gets or sets the text content of the control.
  • Visible - Determines whether the control is visible on the page.
  • Enabled - Determines whether the control is enabled or disabled.

See Also

← Prop Webcontrol Listcontrol VaProp Webcontrol Listcontrol Se β†’