InstructionText Property

Login.InstructionText Property


Gets or sets login instruction text for the user.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public virtual string InstructionText { get; set; }

Property Value

Type: System.String

The login instruction text to display to the user. The default is Empty.

The InstructionText property contains instructions for users logging in to the Web site. This text is displayed in the Login control, following the title.

If the InstructionText property is set to Empty, no instruction text is available to the user.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

The following code example uses the InstructionText property to insert instruction text in the Login control.

<%@ Page Language="C#" AutoEventWireup="False"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" >
    <title>ASP.NET Example</title>
    <form id="form1" runat="server">
        <asp:Login id="Login1" runat="server" 
            InstructionText="Enter your user name and password to log in.">
        <InstructionTextStyle Font-Bold="True" ForeColor="#E0E0E0" BackColor="Gray"></InstructionTextStyle>

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft